UM Java API  6.16.1
com.latencybusters.lbm.LBMObjectRecyclerBase Class Referenceabstract
Inheritance diagram for com.latencybusters.lbm.LBMObjectRecyclerBase:
com.latencybusters.lbm.LBMObjectRecycler

Public Member Functions

void doneWithMessage (LBMMessage obj)
 
LBMMessage retrieveMessage (Object cbObj)
 
void doneWithReceiverStatistics (LBMReceiverStatistics obj)
 
LBMReceiverStatistics retrieveReceiverStatistics (Object cbObj)
 
void doneWithSourceStatistics (LBMSourceStatistics obj)
 
LBMSourceStatistics retrieveSourceStatistics (Object cbObj)
 
void doneWithContextStatistics (LBMContextStatistics obj)
 
LBMContextStatistics retrieveContextStatistics (Object cbObj)
 
void doneWithImmediateMessageReceiverStatistics (LBMImmediateMessageReceiverStatistics obj)
 
LBMImmediateMessageReceiverStatistics retrieveImmediateMessageReceiverStatistics (Object cbObj)
 
void doneWithImmediateMessageSourceStatistics (LBMImmediateMessageSourceStatistics obj)
 
LBMImmediateMessageSourceStatistics retrieveImmediateMessageSourceStatistics (Object cbObj)
 
void doneWithEventQueueStatistics (LBMEventQueueStatistics obj)
 
LBMEventQueueStatistics retrieveEventQueueStatistics (Object cbObj)
 
void doneWithSourceEvent (LBMSourceEvent obj)
 
LBMSourceEvent retrieveSourceEvent (Object cbObj)
 
LBMAsyncOperationInfo retrieveAsyncOperationInfo (Object cbObj)
 
void doneWithAsyncOperationInfo (LBMAsyncOperationInfo obj)
 
void doneWithContextSourceEvent (LBMSourceEvent obj)
 
LBMContextSourceEvent retrieveContextSourceEvent (Object cbObj)
 
void close ()
 

Detailed Description

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.

See also
LBMObjectRecycler

Member Function Documentation

void com.latencybusters.lbm.LBMObjectRecyclerBase.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 com.latencybusters.lbm.LBMObjectRecyclerBase.doneWithAsyncOperationInfo ( LBMAsyncOperationInfo  obj)

If dispose is not called on an LBMAsyncOperationInfo in the callback, it is retained for use in the application. Once the application is finished with the LBMAsyncOperationInfo, it should call dispose and then pass it to this method to make it available for reuse, instead of letting it be garbage collected.

Parameters
objThe LBMAsyncOperationInfo object that the application is done with and is ready for reuse

Referenced by com.latencybusters.lbm.LBMAsyncOperationInfo.receiverQueueMessageRetrieveInfo().

void com.latencybusters.lbm.LBMObjectRecyclerBase.doneWithContextSourceEvent ( LBMSourceEvent  obj)

If dispose is not called on an LBMContextSourceEvent in the callback, it is retained for use in the application. Once the application is finished with the LBMContextSourceEvent, it should call dispose and then pass it to this method to make it available for reuse, instead of letting it be garbage collected.

Parameters
objThe LBMContextSourceEvent object that the application is done with and is ready for reuse
void com.latencybusters.lbm.LBMObjectRecyclerBase.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.

Parameters
objThe LBMContextStatistics object that the application is done with and is ready for reuse
void com.latencybusters.lbm.LBMObjectRecyclerBase.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.

Parameters
objThe LBMEventQueueStatistics object that the application is done with and is ready for reuse
void com.latencybusters.lbm.LBMObjectRecyclerBase.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.

Parameters
objThe LBMImmediateMessageReceiverStatistics object that the application is done with and is ready for reuse
void com.latencybusters.lbm.LBMObjectRecyclerBase.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.

Parameters
objThe LBMImmediateMessageSourceStatistics object that the application is done with and is ready for reuse
void com.latencybusters.lbm.LBMObjectRecyclerBase.doneWithMessage ( LBMMessage  obj)

If dispose is not called on an LBMMessage in the callback, it is retained for use in the application. Once the application is finished with the LBMMessage, it should call dispose and then pass it to this method to make it available for reuse, instead of letting it be garbage collected.

Parameters
objThe LBMMessage object that the application is done with and is ready for reuse
void com.latencybusters.lbm.LBMObjectRecyclerBase.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.

Parameters
objThe LBMReceiverStatistics object that the application is done with and is ready for reuse
void com.latencybusters.lbm.LBMObjectRecyclerBase.doneWithSourceEvent ( LBMSourceEvent  obj)

If dispose is not called on an LBMSourceEvent in the callback, it is retained for use in the application. Once the application is finished with the LBMSourceEvent, it should call dispose and then pass it to this method to make it available for reuse, instead of letting it be garbage collected.

Parameters
objThe LBMSourceEvent object that the application is done with and is ready for reuse
void com.latencybusters.lbm.LBMObjectRecyclerBase.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.

Parameters
objThe LBMSourceStatistics object that the application is done with and is ready for reuse
LBMAsyncOperationInfo com.latencybusters.lbm.LBMObjectRecyclerBase.retrieveAsyncOperationInfo ( 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. It will reset the state of the LBMAsyncOperationInfo once it is retrieved and then use it as if it were a new instance. Returning null causes LBM to create a new instance as if there were no recycler.

Parameters
cbObjThe callback object token that was stored when setting LBMObjectRecycler in the attributes
Returns
Either null or a valid LBMAsyncOperationInfo object will be returned

Referenced by com.latencybusters.lbm.LBMAsyncOperationInfo.receiverQueueMessageRetrieveInfo().

LBMContextSourceEvent com.latencybusters.lbm.LBMObjectRecyclerBase.retrieveContextSourceEvent ( 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. It will reset the state of the LBMContextSourceEvent once it is retrieved and then use it as if it were a new instance. Returning null causes LBM to create a new instance as if there were no recycler.

Parameters
cbObjThe callback object token that was stored when setting LBMObjectRecycler in the attributes
Returns
Either null or a valid LBMContextSourceEvent object will be returned

Referenced by com.latencybusters.lbm.LBMContext.removeSourceNotifyCallback().

LBMContextStatistics com.latencybusters.lbm.LBMObjectRecyclerBase.retrieveContextStatistics ( 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. It will refresh the stats object and then use it as if it were a new instance. Returning null causes LBM to create a new instance as if there were no recycler.

Parameters
cbObjThe callback object token that was stored when setting LBMObjectRecycler in the attributes
Returns
Either null or a valid LBMContextStatistics object will be returned

Referenced by com.latencybusters.lbm.LBMContext.getStatistics(), and com.latencybusters.lbm.LBMMonitorReceiver.removeStatisticsCallback().

LBMEventQueueStatistics com.latencybusters.lbm.LBMObjectRecyclerBase.retrieveEventQueueStatistics ( 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. It will refresh the stats object and then use it as if it were a new instance. Returning null causes LBM to create a new instance as if there were no recycler.

Parameters
cbObjThe callback object token that was stored when setting LBMObjectRecycler in the attributes
Returns
Either null or a valid LBMEventQueueStatistics object will be returned

Referenced by com.latencybusters.lbm.LBMEventQueue.getStatistics(), and com.latencybusters.lbm.LBMMonitorReceiver.removeStatisticsCallback().

LBMImmediateMessageReceiverStatistics com.latencybusters.lbm.LBMObjectRecyclerBase.retrieveImmediateMessageReceiverStatistics ( 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. It will refresh the stats object and then use it as if it were a new instance. Returning null causes LBM to create a new instance as if there were no recycler.

Parameters
cbObjThe callback object token that was stored when setting LBMObjectRecycler in the attributes
Returns
Either null or a valid LBMImmediateMessageReceiverStatistics object will be returned

Referenced by com.latencybusters.lbm.LBMContext.getImmediateMessageReceiverStatistics(), and com.latencybusters.lbm.LBMMonitorReceiver.removeStatisticsCallback().

LBMImmediateMessageSourceStatistics com.latencybusters.lbm.LBMObjectRecyclerBase.retrieveImmediateMessageSourceStatistics ( 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. It will refresh the stats object and then use it as if it were a new instance. Returning null causes LBM to create a new instance as if there were no recycler.

Parameters
cbObjThe callback object token that was stored when setting LBMObjectRecycler in the attributes
Returns
Either null or a valid LBMImmediateMessageSourceStatistics object will be returned

Referenced by com.latencybusters.lbm.LBMContext.getImmediateMessageSourceStatistics(), and com.latencybusters.lbm.LBMMonitorReceiver.removeStatisticsCallback().

LBMMessage com.latencybusters.lbm.LBMObjectRecyclerBase.retrieveMessage ( 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. It will reset the state of the LBMMessage once it is retrieved and then use it as if it were a new instance. Returning null causes LBM to create a new instance as if there were no recycler.

Parameters
cbObjThe callback object token that was stored when setting LBMObjectRecycler in the attributes
Returns
Either null or a valid LBMMessage object will be returned
LBMReceiverStatistics com.latencybusters.lbm.LBMObjectRecyclerBase.retrieveReceiverStatistics ( 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. It will refresh the stats object and then use it as if it were a new instance. Returning null causes LBM to create a new instance as if there were no recycler.

Parameters
cbObjThe callback object token that was stored when setting LBMObjectRecycler in the attributes
Returns
Either null or a valid LBMReceiverStatistics object will be returned

Referenced by com.latencybusters.lbm.LBMContext.getReceiverStatistics(), com.latencybusters.lbm.LBMHFXReceiver.getStatistics(), and com.latencybusters.lbm.LBMMonitorReceiver.removeStatisticsCallback().

LBMSourceEvent com.latencybusters.lbm.LBMObjectRecyclerBase.retrieveSourceEvent ( 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. It will reset the state of the LBMSourceEvent once it is retrieved and then use it as if it were a new instance. Returning null causes LBM to create a new instance as if there were no recycler.

Parameters
cbObjThe callback object token that was stored when setting LBMObjectRecycler in the attributes
Returns
Either null or a valid LBMSourceEvent object will be returned
LBMSourceStatistics com.latencybusters.lbm.LBMObjectRecyclerBase.retrieveSourceStatistics ( 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. It will refresh the stats object and then use it as if it were a new instance. Returning null causes LBM to create a new instance as if there were no recycler.

Parameters
cbObjThe callback object token that was stored when setting LBMObjectRecycler in the attributes
Returns
Either null or a valid LBMSourceStatistics object will be returned

Referenced by com.latencybusters.lbm.LBMContext.getSourceStatistics(), and com.latencybusters.lbm.LBMMonitorReceiver.removeStatisticsCallback().


The documentation for this class was generated from the following file: