|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.latencybusters.lbm.LBMObjectRecyclerBase
public abstract class LBMObjectRecyclerBase
This is an abstract base class, and should be subclassed to override any appropriate non-functional methods, such as doneWith... or retrieve... (whose default implementation in the base class is to always return null). LBMObjectRecycler is provided as a basic general implementation of this class.
After being set in any of the UM attribute classes with the setObjectRecycler() method, UM uses the LBMObjectRecyclerBase internally, instead of automatically creating a new Object of the different supported types.
UM calls the appropriate retrieve method expecting either an object that it can use, or null. In the latter case UM creates the new object as if there were no recycler available. Once finished with an object, calling the appropriate doneWith method makes it available for future retrieve calls.
When implementing your own recycler from this parent class, note that the retrieve methods (below) are called from within the context thread as part of the callbacks. Hence, do not perform any unsafe API calls from within a retrieve method.
LBMObjectRecycler
Constructor Summary | |
---|---|
LBMObjectRecyclerBase()
|
Method Summary | |
---|---|
void |
close()
A method that should be overridden by derived classes, if needed, to provide a way to clean up objects referenced by the recycler (like stats objects). |
void |
doneWithAsyncOperationInfo(LBMAsyncOperationInfo obj)
If dispose is not called on an LBMAsyncOperationInfo in the callback, it is retained for use in the application. |
void |
doneWithContextSourceEvent(LBMSourceEvent obj)
If dispose is not called on an LBMContextSourceEvent in the callback, it is retained for use in the application. |
void |
doneWithContextStatistics(LBMContextStatistics obj)
Once the application is finished with the stats object, it should NOT call dispose but rather should pass it to this method to make the object instance available for reuse, instead of letting it be garbage collected. |
void |
doneWithEventQueueStatistics(LBMEventQueueStatistics obj)
Once the application is finished with the stats object, it should NOT call dispose but rather should pass it to this method to make the object instance available for reuse, instead of letting it be garbage collected. |
void |
doneWithImmediateMessageReceiverStatistics(LBMImmediateMessageReceiverStatistics obj)
Once the application is finished with the stats object, it should NOT call dispose but rather should pass it to this method to make the object instance available for reuse, instead of letting it be garbage collected. |
void |
doneWithImmediateMessageSourceStatistics(LBMImmediateMessageSourceStatistics obj)
Once the application is finished with the stats object, it should NOT call dispose but rather should pass it to this method to make the object instance available for reuse, instead of letting it be garbage collected. |
void |
doneWithMessage(LBMMessage obj)
If dispose is not called on an LBMMessage in the callback, it is retained for use in the application. |
void |
doneWithReceiverStatistics(LBMReceiverStatistics obj)
Once the application is finished with the stats object, it should NOT call dispose but rather should pass it to this method to make the object instance available for reuse, instead of letting it be garbage collected. |
void |
doneWithSourceEvent(LBMSourceEvent obj)
If dispose is not called on an LBMSourceEvent in the callback, it is retained for use in the application. |
void |
doneWithSourceStatistics(LBMSourceStatistics obj)
Once the application is finished with the stats object, it should NOT call dispose but rather should pass it to this method to make the object instance available for reuse, instead of letting it be garbage collected. |
LBMAsyncOperationInfo |
retrieveAsyncOperationInfo(java.lang.Object cbObj)
LBM will call this method to attempt to retrieve an LBMAsyncOperationInfo object instance that it can use instead of creating a new instance to reduce garbage collection. |
LBMContextSourceEvent |
retrieveContextSourceEvent(java.lang.Object cbObj)
LBM will call this method to attempt to retrieve an LBMContextSourceEvent object instance that it can use instead of creating a new instance to reduce garbage collection. |
LBMContextStatistics |
retrieveContextStatistics(java.lang.Object cbObj)
LBM will call this method to attempt to retrieve a stats object instance that it can use instead of creating a new instance to reduce garbage collection. |
LBMEventQueueStatistics |
retrieveEventQueueStatistics(java.lang.Object cbObj)
LBM will call this method to attempt to retrieve a stats object instance that it can use instead of creating a new instance to reduce garbage collection. |
LBMImmediateMessageReceiverStatistics |
retrieveImmediateMessageReceiverStatistics(java.lang.Object cbObj)
LBM will call this method to attempt to retrieve a stats object instance that it can use instead of creating a new instance to reduce garbage collection. |
LBMImmediateMessageSourceStatistics |
retrieveImmediateMessageSourceStatistics(java.lang.Object cbObj)
LBM will call this method to attempt to retrieve a stats object instance that it can use instead of creating a new instance to reduce garbage collection. |
LBMMessage |
retrieveMessage(java.lang.Object cbObj)
LBM will call this method to attempt to retrieve a LBMMessage object instance that it can use instead of creating a new instance to reduce garbage collection. |
LBMReceiverStatistics |
retrieveReceiverStatistics(java.lang.Object cbObj)
LBM will call this method to attempt to retrieve a stats object instance that it can use instead of creating a new instance to reduce garbage collection. |
LBMSourceEvent |
retrieveSourceEvent(java.lang.Object cbObj)
LBM will call this method to attempt to retrieve an LBMSourceEvent object instance that it can use instead of creating a new instance to reduce garbage collection. |
LBMSourceStatistics |
retrieveSourceStatistics(java.lang.Object cbObj)
LBM will call this method to attempt to retrieve a stats object instance that it can use instead of creating a new instance to reduce garbage collection. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LBMObjectRecyclerBase()
Method Detail |
---|
public void doneWithMessage(LBMMessage obj)
obj
- The LBMMessage object that the application is done with and is ready for reusepublic LBMMessage retrieveMessage(java.lang.Object cbObj)
cbObj
- The callback object token that was stored when setting LBMObjectRecycler in the attributes
public void doneWithReceiverStatistics(LBMReceiverStatistics obj)
obj
- The LBMReceiverStatistics object that the application is done with and is ready for reusepublic LBMReceiverStatistics retrieveReceiverStatistics(java.lang.Object cbObj)
cbObj
- The callback object token that was stored when setting LBMObjectRecycler in the attributes
public void doneWithSourceStatistics(LBMSourceStatistics obj)
obj
- The LBMSourceStatistics object that the application is done with and is ready for reusepublic LBMSourceStatistics retrieveSourceStatistics(java.lang.Object cbObj)
cbObj
- The callback object token that was stored when setting LBMObjectRecycler in the attributes
public void doneWithContextStatistics(LBMContextStatistics obj)
obj
- The LBMContextStatistics object that the application is done with and is ready for reusepublic LBMContextStatistics retrieveContextStatistics(java.lang.Object cbObj)
cbObj
- The callback object token that was stored when setting LBMObjectRecycler in the attributes
public void doneWithImmediateMessageReceiverStatistics(LBMImmediateMessageReceiverStatistics obj)
obj
- The LBMImmediateMessageReceiverStatistics object that the application is done with
and is ready for reusepublic LBMImmediateMessageReceiverStatistics retrieveImmediateMessageReceiverStatistics(java.lang.Object cbObj)
cbObj
- The callback object token that was stored when setting LBMObjectRecycler in the attributes
public void doneWithImmediateMessageSourceStatistics(LBMImmediateMessageSourceStatistics obj)
obj
- The LBMImmediateMessageSourceStatistics object that the application is done with
and is ready for reusepublic LBMImmediateMessageSourceStatistics retrieveImmediateMessageSourceStatistics(java.lang.Object cbObj)
cbObj
- The callback object token that was stored when setting LBMObjectRecycler in the attributes
public void doneWithEventQueueStatistics(LBMEventQueueStatistics obj)
obj
- The LBMEventQueueStatistics object that the application is done with
and is ready for reusepublic LBMEventQueueStatistics retrieveEventQueueStatistics(java.lang.Object cbObj)
cbObj
- The callback object token that was stored when setting LBMObjectRecycler in the attributes
public void doneWithSourceEvent(LBMSourceEvent obj)
obj
- The LBMSourceEvent object that the application is done with and is ready for reusepublic LBMSourceEvent retrieveSourceEvent(java.lang.Object cbObj)
cbObj
- The callback object token that was stored when setting LBMObjectRecycler in the attributes
public LBMAsyncOperationInfo retrieveAsyncOperationInfo(java.lang.Object cbObj)
cbObj
- The callback object token that was stored when setting LBMObjectRecycler in the attributes
public void doneWithAsyncOperationInfo(LBMAsyncOperationInfo obj)
obj
- The LBMAsyncOperationInfo object that the application is done with and is ready for reusepublic void doneWithContextSourceEvent(LBMSourceEvent obj)
obj
- The LBMContextSourceEvent object that the application is done with and is ready for reusepublic LBMContextSourceEvent retrieveContextSourceEvent(java.lang.Object cbObj)
cbObj
- The callback object token that was stored when setting LBMObjectRecycler in the attributes
public void close()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |