Hyperic HQ Plugin API v. 4.4.0.2

org.hyperic.hq.common.util
Class ThreadLocalQueue

java.lang.Object
  extended by org.hyperic.hq.common.util.ThreadLocalQueue

public class ThreadLocalQueue
extends java.lang.Object

A singleton that can enqueue objects on a thread local for later retrieval in batch.


Method Summary
 void clearEnqueuedObjects()
          Clear the events objects from the thread local.
 void enqueueObject(java.lang.Object object)
          Enqueue an object on the thread local.
 java.util.List getEnqueuedObjects()
          Retrieve all the objects enqueued on the thread local.
static ThreadLocalQueue getInstance()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ThreadLocalQueue getInstance()
Returns:
The instance.

enqueueObject

public void enqueueObject(java.lang.Object object)
Enqueue an object on the thread local.

Parameters:
object - The object.
Throws:
java.lang.NullPointerException - if the object is null.

getEnqueuedObjects

public java.util.List getEnqueuedObjects()
Retrieve all the objects enqueued on the thread local.

Returns:
A list containing the enqueued objects.

clearEnqueuedObjects

public void clearEnqueuedObjects()
Clear the events objects from the thread local.


Hyperic HQ Plugin API v. 4.4.0.2

Copyright © 2004-2006 Hyperic, Inc. support@hyperic.net, All Rights Reserved.