UM Java API
6.16.1
|
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.
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.
obj | The 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.
obj | The 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.
obj | The 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.
obj | The 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.
obj | The 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.
obj | The 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.
obj | The 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.
obj | The 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.
obj | The 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.
obj | The 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.
cbObj | The callback object token that was stored when setting LBMObjectRecycler in the attributes |
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.
cbObj | The callback object token that was stored when setting LBMObjectRecycler in the attributes |
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.
cbObj | The callback object token that was stored when setting LBMObjectRecycler in the attributes |
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.
cbObj | The callback object token that was stored when setting LBMObjectRecycler in the attributes |
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.
cbObj | The callback object token that was stored when setting LBMObjectRecycler in the attributes |
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.
cbObj | The callback object token that was stored when setting LBMObjectRecycler in the attributes |
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.
cbObj | The callback object token that was stored when setting LBMObjectRecycler in the attributes |
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.
cbObj | The callback object token that was stored when setting LBMObjectRecycler in the attributes |
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.
cbObj | The callback object token that was stored when setting LBMObjectRecycler in the attributes |
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.
cbObj | The callback object token that was stored when setting LBMObjectRecycler in the attributes |
Referenced by com.latencybusters.lbm.LBMContext.getSourceStatistics(), and com.latencybusters.lbm.LBMMonitorReceiver.removeStatisticsCallback().