UM Java API
6.16.1
|
Basic implementation of an object recycler that implements all supported LBM object types. The size limits for the object pools for each object type can be tuned and should be set immediately after instantiating the class and before using any instance of the class. This implementation is synchronized on a per object type basis(doneWithMessage/retrieveMessage, doneWithReceiverStatistics/retrieveReceiverStatistics, etc) via a thread local pool of objects and a synchronized shared pool of objects.
void com.latencybusters.lbm.LBMObjectRecycler.close | ( | ) |
A method to clean up all objects referenced by the recycler when the application is closing (which will dispose all of the stats objects in the recycler).
References com.latencybusters.lbm.LBMContextStatistics.dispose(), com.latencybusters.lbm.LBMImmediateMessageSourceStatistics.dispose(), com.latencybusters.lbm.LBMImmediateMessageReceiverStatistics.dispose(), com.latencybusters.lbm.LBMEventQueueStatistics.dispose(), com.latencybusters.lbm.LBMSourceStatistics.dispose(), and com.latencybusters.lbm.LBMReceiverStatistics.dispose().
void com.latencybusters.lbm.LBMObjectRecycler.disposeThreadLocals | ( | ) |
A convenience method to clean up thread local variables if needed.
void com.latencybusters.lbm.LBMObjectRecycler.doneWithAsyncOperationInfo | ( | LBMAsyncOperationInfo | obj | ) |
Call when finished with a LBMAsyncOperationInfo object. Do not call dispose on the async info object before passing to this method. If the local and shared object limit is reached, it will simply ignore the passed object which will result in it being garbage collected.
obj | The async info object |
|
inherited |
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.LBMObjectRecycler.doneWithContextSourceEvent | ( | LBMContextSourceEvent | obj | ) |
Call when finished with a LBMContextSourceEvent object. Call dispose on the source event object before passing to this method. If the local and shared object size is reached, it will simply ignore the passed object which will result in it being garbage collected.
obj | The message object |
void com.latencybusters.lbm.LBMObjectRecycler.doneWithContextStatistics | ( | LBMContextStatistics | obj | ) |
Call when finished with a LBMContextStatistics object. Do not call dispose on the stats object before passing to this method. If the local and shared object size is reached, it will simply ignore the passed object which will result in it being garbage collected.
obj | The stats object |
void com.latencybusters.lbm.LBMObjectRecycler.doneWithEventQueueStatistics | ( | LBMEventQueueStatistics | obj | ) |
Call when finished with a LBMEventQueueStatistics object. Do not call dispose on the stats object before passing to this method. If the local and shared object limit is reached, it will simply ignore the passed object which will result in it being garbage collected.
obj | The stats object |
void com.latencybusters.lbm.LBMObjectRecycler.doneWithImmediateMessageReceiverStatistics | ( | LBMImmediateMessageReceiverStatistics | obj | ) |
Call when finished with a LBMImmediateMessageReceiverStatistics object. Do not call dispose on the stats object before passing to this method. If the local and shared object limit is reached, it will simply ignore the passed object which will result in it being garbage collected.
obj | The stats object |
void com.latencybusters.lbm.LBMObjectRecycler.doneWithImmediateMessageSourceStatistics | ( | LBMImmediateMessageSourceStatistics | obj | ) |
Call when finished with a LBMImmediateMessageSourceStatistics object. Do not call dispose on the stats object before passing to this method. If the local and shared object limit is reached, it will simply ignore the passed object which will result in it being garbage collected.
obj | The stats object |
void com.latencybusters.lbm.LBMObjectRecycler.doneWithMessage | ( | LBMMessage | obj | ) |
Call when finished with a LBMMessage object. Call dispose on the message object before passing to this method. If the local and shared object size is reached, it will simply ignore the passed object which will result in it being garbage collected.
obj | The message object |
void com.latencybusters.lbm.LBMObjectRecycler.doneWithReceiverStatistics | ( | LBMReceiverStatistics | obj | ) |
Call when finished with a LBMReceiverStatistics object. Do not call dispose on the stats object before passing to this method. If the local and shared object limit is reached, it will simply ignore the passed object which will result in it being garbage collected.
obj | The stats object |
void com.latencybusters.lbm.LBMObjectRecycler.doneWithSourceEvent | ( | LBMSourceEvent | obj | ) |
Call when finished with a LBMSourceEvent object. Call dispose on the source event object before passing to this method. If the local and shared object size is reached, it will simply ignore the passed object which will result in it being garbage collected.
obj | The message object |
void com.latencybusters.lbm.LBMObjectRecycler.doneWithSourceStatistics | ( | LBMSourceStatistics | obj | ) |
Call when finished with a LBMSourceStatistics object. Do not call dispose on the stats object before passing to this method. If the local and shared object limit is reached, it will simply ignore the passed object which will result in it being garbage collected.
obj | The stats object |
int com.latencybusters.lbm.LBMObjectRecycler.getLocalPoolAsyncOperationInfoCount | ( | ) |
Gets the current number of objects in the local pool.
int com.latencybusters.lbm.LBMObjectRecycler.getLocalPoolContextSourceEventCount | ( | ) |
Gets the current number of objects in the local pool.
int com.latencybusters.lbm.LBMObjectRecycler.getLocalPoolContextStatisticsCount | ( | ) |
Gets the current number of objects in the local pool.
int com.latencybusters.lbm.LBMObjectRecycler.getLocalPoolEventQueueStatisticsCount | ( | ) |
Gets the current number of objects in the local pool.
int com.latencybusters.lbm.LBMObjectRecycler.getLocalPoolImmediateMessageReceiverStatisticsCount | ( | ) |
Gets the current number of objects in the local pool.
int com.latencybusters.lbm.LBMObjectRecycler.getLocalPoolImmediateMessageSourceStatisticsCount | ( | ) |
Gets the current number of objects in the local pool.
int com.latencybusters.lbm.LBMObjectRecycler.getLocalPoolMessageCount | ( | ) |
Gets the current number of objects in the local pool.
int com.latencybusters.lbm.LBMObjectRecycler.getLocalPoolReceiverStatisticsCount | ( | ) |
Gets the current number of objects in the local pool.
int com.latencybusters.lbm.LBMObjectRecycler.getLocalPoolSourceEventCount | ( | ) |
Gets the current number of objects in the local pool.
int com.latencybusters.lbm.LBMObjectRecycler.getLocalPoolSourceStatisticsCount | ( | ) |
Gets the current number of objects in the local pool.
LBMAsyncOperationInfo com.latencybusters.lbm.LBMObjectRecycler.retrieveAsyncOperationInfo | ( | Object | cbObj | ) |
LBM will call this method to attempt to retrieve an object that it can reuse. It will transfer a batch of objects from the shared pool when the local pool gets low or will create the objects if the shared pool is empty.
cbObj | The callback object token that was stored when setting LBMObjectRecycler in the attributes |
LBMContextSourceEvent com.latencybusters.lbm.LBMObjectRecycler.retrieveContextSourceEvent | ( | Object | cbObj | ) |
LBM will call this method to attempt to retrieve an object that it can reuse. It will transfer a batch of objects from the shared pool when the local pool gets low or will create the objects if the shared pool is empty.
cbObj | The callback object token that was stored when setting LBMObjectRecycler in the attributes |
LBMContextStatistics com.latencybusters.lbm.LBMObjectRecycler.retrieveContextStatistics | ( | Object | cbObj | ) |
LBM will call this method to attempt to retrieve an object that it can reuse. It will transfer a batch of objects from the shared pool when the local pool gets low or will create the objects if the shared pool is empty.
cbObj | The callback object token that was stored when setting LBMObjectRecycler in the attributes |
LBMEventQueueStatistics com.latencybusters.lbm.LBMObjectRecycler.retrieveEventQueueStatistics | ( | Object | cbObj | ) |
LBM will call this method to attempt to retrieve an object that it can reuse. It will transfer a batch of objects from the shared pool when the local pool gets low or will create the objects if the shared pool is empty.
cbObj | The callback object token that was stored when setting LBMObjectRecycler in the attributes |
LBMImmediateMessageReceiverStatistics com.latencybusters.lbm.LBMObjectRecycler.retrieveImmediateMessageReceiverStatistics | ( | Object | cbObj | ) |
LBM will call this method to attempt to retrieve an object that it can reuse. It will transfer a batch of objects from the shared pool when the local pool gets low or will create the objects if the shared pool is empty.
cbObj | The callback object token that was stored when setting LBMObjectRecycler in the attributes |
LBMImmediateMessageSourceStatistics com.latencybusters.lbm.LBMObjectRecycler.retrieveImmediateMessageSourceStatistics | ( | Object | cbObj | ) |
LBM will call this method to attempt to retrieve an object that it can reuse. It will transfer a batch of objects from the shared pool when the local pool gets low or will create the objects if the shared pool is empty.
cbObj | The callback object token that was stored when setting LBMObjectRecycler in the attributes |
LBMMessage com.latencybusters.lbm.LBMObjectRecycler.retrieveMessage | ( | Object | cbObj | ) |
LBM will call this method to attempt to retrieve an object that it can reuse. It will transfer a batch of objects from the shared pool when the local pool gets low or will create the objects if the shared pool is empty.
cbObj | The callback object token that was stored when setting LBMObjectRecycler in the attributes |
LBMReceiverStatistics com.latencybusters.lbm.LBMObjectRecycler.retrieveReceiverStatistics | ( | Object | cbObj | ) |
LBM will call this method to attempt to retrieve an object that it can reuse. It will transfer a batch of objects from the shared pool when the local pool gets low or will create the objects if the shared pool is empty.
cbObj | The callback object token that was stored when setting LBMObjectRecycler in the attributes |
LBMSourceEvent com.latencybusters.lbm.LBMObjectRecycler.retrieveSourceEvent | ( | Object | cbObj | ) |
LBM will call this method to attempt to retrieve an object that it can reuse. It will transfer a batch of objects from the shared pool when the local pool gets low or will create the objects if the shared pool is empty.
cbObj | The callback object token that was stored when setting LBMObjectRecycler in the attributes |
LBMSourceStatistics com.latencybusters.lbm.LBMObjectRecycler.retrieveSourceStatistics | ( | Object | cbObj | ) |
LBM will call this method to attempt to retrieve an object that it can reuse. It will transfer a batch of objects from the shared pool when the local pool gets low or will create the objects if the shared pool is empty.
cbObj | The callback object token that was stored when setting LBMObjectRecycler in the attributes |
int com.latencybusters.lbm.LBMObjectRecycler.returnAllAsyncOperationInfosToSharedPool | ( | ) |
Returns all of the objects in the local pool back to the shared pool. If the shared pool is full, the objects are still removed from the local pool but they are discarded and will be garbage collected (and are not counted in the return value as objects that were actually returned).
int com.latencybusters.lbm.LBMObjectRecycler.returnAllContextSourceEventsToSharedPool | ( | ) |
Returns all of the objects in the local pool back to the shared pool. If the shared pool is full, the objects are still removed from the local pool but they are discarded and will be garbage collected (and are not counted in the return value as objects that were actually returned).
int com.latencybusters.lbm.LBMObjectRecycler.returnAllContextStatisticsToSharedPool | ( | ) |
Returns all of the objects in the local pool back to the shared pool. If the shared pool is full, the objects are still removed from the local pool but they are discarded and will be garbage collected (and are not counted in the return value as objects that were actually returned).
int com.latencybusters.lbm.LBMObjectRecycler.returnAllEventQueueStatisticsToSharedPool | ( | ) |
Returns all of the objects in the local pool back to the shared pool. If the shared pool is full, the objects are still removed from the local pool but they are discarded and will be garbage collected (and are not counted in the return value as objects that were actually returned).
int com.latencybusters.lbm.LBMObjectRecycler.returnAllImmediateMessageReceiverStatisticsToSharedPool | ( | ) |
Returns all of the objects in the local pool back to the shared pool. If the shared pool is full, the objects are still removed from the local pool but they are discarded and will be garbage collected (and are not counted in the return value as objects that were actually returned).
int com.latencybusters.lbm.LBMObjectRecycler.returnAllImmediateMessageSourceStatisticsToSharedPool | ( | ) |
Returns all of the objects in the local pool back to the shared pool. If the shared pool is full, the objects are still removed from the local pool but they are discarded and will be garbage collected (and are not counted in the return value as objects that were actually returned).
int com.latencybusters.lbm.LBMObjectRecycler.returnAllMessagesToSharedPool | ( | ) |
Returns all of the objects in the local pool back to the shared pool. If the shared pool is full, the objects are still removed from the local pool but they are discarded and will be garbage collected (and are not counted in the return value as objects that were actually returned).
int com.latencybusters.lbm.LBMObjectRecycler.returnAllReceiverStatisticsToSharedPool | ( | ) |
Returns all of the objects in the local pool back to the shared pool. If the shared pool is full, the objects are still removed from the local pool but they are discarded and will be garbage collected (and are not counted in the return value as objects that were actually returned).
int com.latencybusters.lbm.LBMObjectRecycler.returnAllSourceEventsToSharedPool | ( | ) |
Returns all of the objects in the local pool back to the shared pool. If the shared pool is full, the objects are still removed from the local pool but they are discarded and will be garbage collected (and are not counted in the return value as objects that were actually returned).
int com.latencybusters.lbm.LBMObjectRecycler.returnAllSourceStatisticsToSharedPool | ( | ) |
Returns all of the objects in the local pool back to the shared pool. If the shared pool is full, the objects are still removed from the local pool but they are discarded and will be garbage collected (and are not counted in the return value as objects that were actually returned).
void com.latencybusters.lbm.LBMObjectRecycler.setLocalAsyncOpInfosPoolSize | ( | int | size | ) |
Sets the size of the thread local pool of LBMAsyncOperationInfo for all LBMObjectRecyclers (defaults to 10)
size | the size of the local pool |
void com.latencybusters.lbm.LBMObjectRecycler.setLocalCtxSrcEvPoolSize | ( | int | size | ) |
Sets the size of the thread local pool of LBMContextSourceEvents for all LBMObjectRecyclers (defaults to 10)
size | the size of the local pool |
void com.latencybusters.lbm.LBMObjectRecycler.setLocalCtxStatsPoolSize | ( | int | size | ) |
Sets the size of the thread local pool of LBMContextStatistics for all LBMObjectRecyclers (defaults to 10)
size | the size of the local pool |
void com.latencybusters.lbm.LBMObjectRecycler.setLocalEvqStatsPoolSize | ( | int | size | ) |
Sets the size of the thread local pool of LBMEventQueueStatistics for all LBMObjectRecyclers (defaults to 10)
size | the size of the local pool |
void com.latencybusters.lbm.LBMObjectRecycler.setLocalIMRcvStatsPoolSize | ( | int | size | ) |
Sets the size of the thread local pool of LBMImmediateMessageReceiverStatistics for all LBMObjectRecyclers (defaults to 10)
size | the size of the local pool |
void com.latencybusters.lbm.LBMObjectRecycler.setLocalIMSrcStatsPoolSize | ( | int | size | ) |
Sets the size of the thread local pool of LBMImmediateMessageSourceStatistics for all LBMObjectRecyclers (defaults to 10)
size | the size of the local pool |
void com.latencybusters.lbm.LBMObjectRecycler.setLocalMsgPoolSize | ( | int | size | ) |
Sets the size of the thread local pool of LBMMessages for all LBMObjectRecyclers (defaults to 1000)
size | the size of the local pool |
void com.latencybusters.lbm.LBMObjectRecycler.setLocalRcvStatsPoolSize | ( | int | size | ) |
Sets the size of the thread local pool of LBMReceiverStatistics for all LBMObjectRecyclers (defaults to 10)
size | the size of the local pool |
void com.latencybusters.lbm.LBMObjectRecycler.setLocalSrcEvPoolSize | ( | int | size | ) |
Sets the size of the thread local pool of LBMSourceEvents for all LBMObjectRecyclers (defaults to 10)
size | the size of the local pool |
void com.latencybusters.lbm.LBMObjectRecycler.setLocalSrcStatsPoolSize | ( | int | size | ) |
Sets the size of the thread local pool of LBMSourceStatistics for all LBMObjectRecyclers (defaults to 10)
size | the size of the local pool |
void com.latencybusters.lbm.LBMObjectRecycler.setSharedAsyncOpInfosPoolSize | ( | int | size | ) |
Sets the size of the shared pool of LBMAsyncOperationInfo for all LBMObjectRecyclers (defaults to 20)
size | the size of the shared pool |
void com.latencybusters.lbm.LBMObjectRecycler.setSharedCtxSrcEvPoolSize | ( | int | size | ) |
Sets the size of the shared pool of LBMContextSourceEvents for all LBMObjectRecyclers (defaults to 20)
size | the size of the shared pool |
void com.latencybusters.lbm.LBMObjectRecycler.setSharedCtxStatsPoolSize | ( | int | size | ) |
Sets the size of the shared pool of LBMContextStatistics for all LBMObjectRecyclers (defaults to 20)
size | the size of the shared pool |
void com.latencybusters.lbm.LBMObjectRecycler.setSharedEvqStatsPoolSize | ( | int | size | ) |
Sets the size of the shared pool of LBMEventQueueStatistics for all LBMObjectRecyclers (defaults to 20)
size | the size of the shared pool |
void com.latencybusters.lbm.LBMObjectRecycler.setSharedIMRcvStatsPoolSize | ( | int | size | ) |
Sets the size of the shared pool of LBMImmediateMessageReceiverStatistics for all LBMObjectRecyclers (defaults to 20)
size | the size of the shared pool |
void com.latencybusters.lbm.LBMObjectRecycler.setSharedIMSrcStatsPoolSize | ( | int | size | ) |
Sets the size of the shared pool of LBMImmediateMessageSourceStatistics for all LBMObjectRecyclers (defaults to 20)
size | the size of the shared pool |
void com.latencybusters.lbm.LBMObjectRecycler.setSharedMsgPoolSize | ( | int | size | ) |
Sets the size of the shared pool of LBMMessages for all LBMObjectRecyclers (defaults to 2000)
size | the size of the shared pool |
void com.latencybusters.lbm.LBMObjectRecycler.setSharedRcvStatsPoolSize | ( | int | size | ) |
Sets the size of the shared pool of LBMReceiverStatistics for all LBMObjectRecyclers (defaults to 20)
size | the size of the shared pool |
void com.latencybusters.lbm.LBMObjectRecycler.setSharedSrcEvPoolSize | ( | int | size | ) |
Sets the size of the shared pool of LBMSourceEvents for all LBMObjectRecyclers (defaults to 20)
size | the size of the shared pool |
void com.latencybusters.lbm.LBMObjectRecycler.setSharedSrcStatsPoolSize | ( | int | size | ) |
Sets the size of the shared pool of LBMSourceStatistics for all LBMObjectRecyclers (defaults to 20)
size | the size of the shared pool |