|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.service.queue.EventQueue
public abstract class EventQueue
This is the base class for objects that queue up method calls. This will allow multiple Threads to read from the queue.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
EventQueue()
Constructs a new EventQueue |
Method Summary | |
---|---|
protected void |
addElement()
Notifies the Queue that the head of the queue has been filled in and added to the queue. |
protected abstract EventQueueElement |
createElement()
Constructs a new blank EventQueueElement. |
protected abstract void |
dispatchElement(EventQueueElement pElem)
Dispatches a Queue element to be handled. |
protected void |
dispatchQueueElements()
This will read and dispatch elements from the Queue in a loop until the service is stopped. |
void |
doStartService()
Initializes the service by creating the queue (if it hasn't already been created). |
void |
doStopService()
This will shut down the threads reading from the Queue. |
void |
flushQueue()
Flush the queue. |
protected boolean |
getElement(EventQueueElement pElement)
Reads one element from the queue, copies the element to the specified element, and clears the element. |
int |
getInitialCapacity()
Returns the initial capacity of the queue as expressed as the number of elements. |
int |
getQueuedEventCount()
Returns the total number of events that were added to the queue |
protected EventQueueElement |
getQueueHead()
Returns a pointer to the next element in the queue that will be written. |
int |
getQueueSize()
Returns the number of events currently in the queue waiting to be sent to their desintations. |
int |
getThreadCount()
Returns the number Threads that will be reading and dispatching from the queue. |
javax.transaction.TransactionManager |
getTransactionManager()
|
boolean |
getTransactionsEnabled()
|
protected void |
handleDispatchError(java.lang.Throwable pThrowable)
This is called when an exception is thrown while dispatching from the queue. |
EventQueueElement[] |
listQueuedElements()
Creates and returns a new array containing references to all the elements in the Queue, in the order that they were inserted. |
void |
setInitialCapacity(int pInitialCapacity)
Sets the initial capacity of the queue as expressed as the number of elements. |
void |
setThreadCount(int pThreadCount)
Sets the number Threads that will be reading and dispatching from the queue. |
void |
setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
|
void |
setTransactionsEnabled(boolean pTransactionsEnabled)
|
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
Constructor Detail |
---|
public EventQueue()
Method Detail |
---|
public javax.transaction.TransactionManager getTransactionManager()
public void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
public boolean getTransactionsEnabled()
public void setTransactionsEnabled(boolean pTransactionsEnabled)
protected abstract EventQueueElement createElement()
protected abstract void dispatchElement(EventQueueElement pElem)
protected EventQueueElement getQueueHead()
protected void addElement()
protected boolean getElement(EventQueueElement pElement)
public void flushQueue()
protected void dispatchQueueElements()
protected void handleDispatchError(java.lang.Throwable pThrowable)
public EventQueueElement[] listQueuedElements()
public void setInitialCapacity(int pInitialCapacity)
public int getInitialCapacity()
public void setThreadCount(int pThreadCount)
public int getThreadCount()
public int getQueueSize()
public int getQueuedEventCount()
public void doStartService()
doStartService
in class GenericService
public void doStopService()
doStopService
in class GenericService
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |