UM Java API
6.16.1
|
Public Member Functions | |
LBMHotFailoverSource (LBMContext lbmctx, LBMTopic lbmtopic) throws LBMException | |
LBMHotFailoverSource (LBMContext lbmctx, LBMTopic lbmtopic, LBMSourceEventCallback cb, Object cbArg) throws LBMException | |
LBMHotFailoverSource (LBMContext lbmctx, LBMTopic lbmtopic, LBMEventQueue lbmevq) throws LBMException | |
LBMHotFailoverSource (LBMContext lbmctx, LBMTopic lbmtopic, LBMSourceEventCallback cb, Object cbArg, LBMEventQueue lbmevq) throws LBMException | |
void | send (byte[] message, int messageLength, long sqn, int flags) throws LBMException |
void | send (byte[] message, int messageLength, long sqn, int flags, Object cbArg) throws LBMException |
void | send (byte[] message, int messageLength, long sqn, int flags, LBMSourceSendExInfo exinfo) throws LBMException |
void | send (ByteBuffer message, int startPosition, int messageLength, long sqn, int flags) throws LBMException |
void | send (ByteBuffer message, int startPosition, int messageLength, long sqn, int flags, Object cbArg) throws LBMException |
void | send (ByteBuffer message, int startPosition, int messageLength, long sqn, int flags, LBMSourceSendExInfo exinfo) throws LBMException |
void | sendReceiverReset (int flags, LBMSourceSendExInfo exinfo) throws LBMException |
void | unblock () throws LBMException |
void | umederegister () throws LBMException |
void | close () throws LBMException |
boolean | isClosed () |
LBMConfigOption[] | dumpAttributeList () |
LBMSourceChannelInfo | createChannel (long channelNumber) throws LBMException |
void | deleteChannel (LBMSourceChannelInfo channelInfo) throws LBMException |
void | addSourceCallback (LBMSourceEventCallback cb) |
void | addSourceCallback (LBMSourceEventCallback cb, Object cbArg) |
void | removeSourceCallback (LBMSourceEventCallback cb) |
void | removeSourceCallback (LBMSourceEventCallback cb, Object cbArg) |
String | getAttributeValue (String attributeName) throws LBMException |
void | setAttributeValue (String attributeName, String attributeValue) throws LBMException |
Object | setProperty (String attributeName, String attributeValue) |
void | load (InputStream inStream) throws IOException |
LBMSourceStatistics | getStatistics () throws LBMException |
void | resetStatistics () throws LBMException |
void | sendStatistics (ByteBuffer message, int messageLength, int statsType) throws LBMException |
void | send (byte[] message, int messageLength, int flags) throws LBMException |
void | send (byte[] message, int messageLength, int flags, Object cbArg) throws LBMException |
void | send (byte[] message, int messageLength, int flags, LBMSourceSendExInfo exinfo) throws LBMException |
void | send (ByteBuffer message, int startPosition, int messageLength, int flags) throws LBMException |
void | send (ByteBuffer message, int startPosition, int messageLength, int flags, Object cbArg) throws LBMException |
void | send (ByteBuffer message, int startPosition, int messageLength, int flags, LBMSourceSendExInfo exinfo) throws LBMException |
void | send (LBMRequest lbmreq, int flags) throws LBMException |
void | send (LBMRequest lbmreq, LBMEventQueue lbmevq, int flags) throws LBMException |
void | send (LBMRequest lbmreq, LBMEventQueue lbmevq, int flags, LBMSourceSendExInfo exinfo) throws LBMException |
void | send (LBMRequest lbmreq, int flags, LBMSourceSendExInfo exinfo) throws LBMException |
void | flush () throws LBMException |
int | getInflight (int type) throws LBMException |
LBMFlightSizeInflightInfo | getInflightEx (int type) throws LBMException |
int | setInflight (int type, LBMSetInflightCallback setInflightCb, Object clientd) throws LBMException |
LBMFlightSizeInflightInfo | setInflightEx (int type, LBMSetInflightCallback setInflightCb, Object clientd) throws LBMException |
void | setUMEMessageStable (long sqn) throws LBMException |
ByteBuffer | getMessagesBuffer () throws LBMException |
int | acquireMessageBufferPosition (final int messageLength, final int flags) throws LBMException |
void | messageBuffersComplete () throws LBMException |
int | messageBuffersCompleteAndAcquirePosition (final int messageLength, final int flags) throws LBMException |
void | messageBuffersCancel () throws LBMException |
Protected Member Functions | |
void | finalize () throws LBMException |
int | onSourceEvent (LBMSourceEvent sourceEvent) |
int | onResponse (LBMRequest lbmreq, LBMMessage lbmmsg) |
LBM Hot-Failover Source class.
Warning: It is not safe to instantiate this object from a context thread callback.
com.latencybusters.lbm.LBMHotFailoverSource.LBMHotFailoverSource | ( | LBMContext | lbmctx, |
LBMTopic | lbmtopic | ||
) | throws LBMException |
Instantiate an LBM Hot-Failover Source object associated with a given context and topic. Warning: It is not safe to call this constructor from a context thread callback.
lbmctx | Context with which to associate the source. |
lbmtopic | LBMTopic used to initialize the source. |
LBMException | if any error occurs creating the hot failover source. |
References com.latencybusters.lbm.LBM.EINVAL.
com.latencybusters.lbm.LBMHotFailoverSource.LBMHotFailoverSource | ( | LBMContext | lbmctx, |
LBMTopic | lbmtopic, | ||
LBMSourceEventCallback | cb, | ||
Object | cbArg | ||
) | throws LBMException |
Instantiate an LBM Hot-Failover Source object associated with a given context and topic and initialize source event callback. Warning: It is not safe to call this constructor from a context thread callback.
lbmctx | Context with which to associate the source. |
lbmtopic | LBMTopic used to initialize the source. |
cb | An object implementing the LBMSourceEventCallback interface |
cbArg | Callback token object |
LBMException | if any error occurs creating the hot failover source. |
References com.latencybusters.lbm.LBMSource.addSourceCallback(), and com.latencybusters.lbm.LBM.EINVAL.
com.latencybusters.lbm.LBMHotFailoverSource.LBMHotFailoverSource | ( | LBMContext | lbmctx, |
LBMTopic | lbmtopic, | ||
LBMEventQueue | lbmevq | ||
) | throws LBMException |
Instantiate an LBM Hot-Failover Source object associated with a given context, topic, and event queue. Warning: It is not safe to call this constructor from a context thread callback.
lbmctx | Context with which to associate the source. |
lbmtopic | LBMTopic used to initialize the source. |
lbmevq | Event queue with which to associate the source (all source events will be posted to this event queue). |
LBMException | if any error occurs creating the hot failover source. |
References com.latencybusters.lbm.LBM.EINVAL.
com.latencybusters.lbm.LBMHotFailoverSource.LBMHotFailoverSource | ( | LBMContext | lbmctx, |
LBMTopic | lbmtopic, | ||
LBMSourceEventCallback | cb, | ||
Object | cbArg, | ||
LBMEventQueue | lbmevq | ||
) | throws LBMException |
Instantiate an LBM Hot-Failover Source object associated with a given context, topic, and event queue and initialize source event callback. Warning: It is not safe to call this constructor from a context thread callback.
lbmctx | Context with which to associate the source. |
lbmtopic | LBMTopic used to initialize the source. |
cb | An object implementing the LBMSourceEventCallback interface |
cbArg | Callback token object |
lbmevq | Event queue with which to associate the source (all source events will be posted to this event queue). |
LBMException | if any error occurs creating the hot failover source. |
References com.latencybusters.lbm.LBMSource.addSourceCallback(), and com.latencybusters.lbm.LBM.EINVAL.
|
inherited |
Reserve space in this source's messages buffer. When this method returns, we have guaranteed that there is sufficient space in the message buffer to safely write up to messageLength bytes starting at the returned position. The application must ensure that this contract is not broken. When message data has been written, call messageBuffersComplete() to make them available to receivers.
If non-blocking send, and the source would have to wait for recievers to catch up, a value of -1 is returned. This is in contrast to send methods that throw a new LBMEWouldBlockException and is done for performance reasons.
Only LBT-SMX transports currently support this method.
Warning Not thread safe among sources sharing the same transport.
messageLength | Length in bytes to reserve in the messages buffer |
flags | Source send flags |
LBMException | If an error occurs |
Referenced by com.latencybusters.lbm.LBMSource.getMessagesBuffer(), and com.latencybusters.lbm.LBMSource.messageBuffersCompleteAndAcquirePosition().
|
inherited |
Register a source event callback
cb | Object implementing the LBMSourceEventCallback interface |
Referenced by com.latencybusters.lbm.LBMHotFailoverSource.LBMHotFailoverSource(), and com.latencybusters.lbm.LBMSource.LBMSource().
|
inherited |
Register a source event callback (and callback token)
cb | Object implementing the LBMSourceEventCallback interface |
cbArg | Callback token object |
|
inherited |
Close this source
Warning: It is not safe to call this method from a context thread callback.
LBMException | if any error occurred during source deletion. |
Referenced by com.latencybusters.lbm.LBMSource.finalize().
|
inherited |
Create a channel object to send messages with the given channel number. The application is responsible for calling close() or LBMSource.deleteChannel() on any LBMSourceChannelInfo object allocated via the LBMSourceChannelInfo constructor or the LBMSource.createChannel method once it is no longer being used. Failure to do so will result in unmanaged resources not being reclaimed.
channelNumber | Channel number in the range 0-4294967295 |
|
inherited |
Delete a channel object
channelInfo | A channelInfo object |
|
inherited |
Returns an array of LBMConfigOptions
|
protected |
This method is for internal use only, and is not supported for customer applications.
|
inherited |
Send messages from both the explicit and implicit batches ASAP.
LBMException | if any error occurred during sending. |
References com.latencybusters.lbm.LBMSource.messageBuffersComplete(), and com.latencybusters.lbm.LBMSource.onResponse().
|
inherited |
Returns the value of a source-related attribute for this source.
attributeName | Name of the attribute to retrieve |
LBMException | if attributeName is not a valid attribute. |
|
inherited |
Get the current inflight value for this source
type | The type of flight size |
LBMException | if an error occurs while retrieving the inflight value |
References com.latencybusters.lbm.LBMSource.setInflight().
|
inherited |
Get the current inflight values of messages and bytes for this source
type | The type of flight size |
LBMException | if an error occurs while retrieving the inflight value |
References com.latencybusters.lbm.LBMSource.setInflightEx().
|
inherited |
Get the buffer for writing messages for an LBT-SMX source. This buffer will not change for the duration of this source. Messages are written into this buffer by using the return value of acquireMessageBufferPosition(final int, final int).
Only LBT-SMX transports currently support this method.
References com.latencybusters.lbm.LBMSource.acquireMessageBufferPosition(), and com.latencybusters.lbm.LBMSource.messageBuffersComplete().
|
inherited |
Return the current set of source transport statistics for this source.
LBMException | if any error occurred retrieving source statistics. |
References com.latencybusters.lbm.LBMSourceStatistics.refresh().
|
inherited |
Returns boolean describing whether this instance has a reference to a valid C source
|
inherited |
Reads a property (attribute) list (key and element pairs) from the input stream.
inStream | Input stream of bytes |
IOException | if any I/O error occurs. |
LBMRuntimeException | if any invalid attribute is detected in inStream . |
References com.latencybusters.lbm.LBMSource.setProperty().
|
inherited |
For this source, declare all previously acquired, but not completed, buffers to be invalid. The messages will not be delivered to receiving applications and the reserved buffer space will be ignored.
Only LBT-SMX transports currently support this method.
Warning Not thread safe among sources sharing the same transport.
LBMException |
References com.latencybusters.lbm.LBM.EOS.
|
inherited |
Commits all previously acquired message buffers for this source's transport to be read by receivers. Call this when message data placed in the transport buffer is ready to be consumed by receivers. Calling this method with no new data has no effect.
Only LBT-SMX transports currently support this method.
Warning Not thread safe among sources sharing the same transport.
LBMException |
Referenced by com.latencybusters.lbm.LBMSource.flush(), and com.latencybusters.lbm.LBMSource.getMessagesBuffer().
|
inherited |
Convenience method that calls messageBuffersComplete() followed by acquireMessageBufferPosition(final int, final int). This is intended to reduce the number of calls per message.
Only LBT-SMX transports currently support this method.
Warning Not thread safe among sources sharing the same transport.
messageLength | - length in bytes to reserve in the messages buffer |
flags | - Source send flags |
LBMException |
References com.latencybusters.lbm.LBMSource.acquireMessageBufferPosition().
|
protectedinherited |
Default response message callback, which calls the interface specified when the request was sent. This method may be overridden by subclassing the LBMSource class.
lbmreq | LBMRequest object returned by corresponding send call |
lbmmsg | LBMMessage object containing the response data |
Referenced by com.latencybusters.lbm.LBMSource.flush().
|
protectedinherited |
Default source event callback. Although possible, it is not recommended that this function be overridden by subclassing the LBMSource class. Instead, the source may be initialized using a constructor that specifies an LBMSourceEventCallback interface or by registering (deregistering) the callback using addSourceCallback() (removeSourceCallback()).
sourceEvent | LBMSourceEvent object containing information about the posted source-related event. |
References com.latencybusters.lbm.LBMSourceEventCallback.onSourceEvent(), and com.latencybusters.lbm.LBMSourceEvent.promote().
|
inherited |
Deregister a source event callback
cb | Previously registered object implementing the LBMSourceEventCallback interface |
|
inherited |
Deregister a source event callback (and callback token)
cb | Previously registered object implementing the LBMSourceEventCallback interface |
cbArg | Callback token object |
|
inherited |
Reset the transport statistics for this source.
LBMException | if any error occurred resetting source statistics. |
void com.latencybusters.lbm.LBMHotFailoverSource.send | ( | byte [] | message, |
int | messageLength, | ||
long | sqn, | ||
int | flags | ||
) | throws LBMException |
Send a message to the topic associated with the LBM source.
message | Data to send in this message |
messageLength | Number of bytes of data to send in this message |
sqn | The application sequence number to associate with this message |
flags | Flags indicating various conditions. See next section for possible OR'd set of values. |
LBMException | if any error occurs sending the message. |
void com.latencybusters.lbm.LBMHotFailoverSource.send | ( | byte [] | message, |
int | messageLength, | ||
long | sqn, | ||
int | flags, | ||
Object | cbArg | ||
) | throws LBMException |
Send a message to the topic associated with the LBM source.
message | Data to send in this message |
messageLength | Number of bytes of data to send in this message |
sqn | The application sequence number to associate with this message |
flags | Flags indicating various conditions. See next section for possible OR'd set of values. |
cbArg | Client object to be passed back in stability or confirmation events related to this message (UME only) |
LBMException | if any error occurs sending the message. |
void com.latencybusters.lbm.LBMHotFailoverSource.send | ( | byte [] | message, |
int | messageLength, | ||
long | sqn, | ||
int | flags, | ||
LBMSourceSendExInfo | exinfo | ||
) | throws LBMException |
Send a message to the topic associated with the LBM source.
message | Data to send in this message |
messageLength | Number of bytes of data to send in this message |
sqn | The application sequence number to associate with this message |
flags | Flags indicating various conditions. See next section for possible OR'd set of values. |
exinfo | LBMSourceSendExInfo object, which includes flags to change callback behavior and a client-supplied object to be passed back. (UME only) |
LBMException | if any error occurs sending the message. |
void com.latencybusters.lbm.LBMHotFailoverSource.send | ( | ByteBuffer | message, |
int | startPosition, | ||
int | messageLength, | ||
long | sqn, | ||
int | flags | ||
) | throws LBMException |
Send a message to the topic associated with the LBM source.
message | Data to send in this message |
startPosition | Starting position within the buffer to send from |
messageLength | Number of bytes of data to send in this message |
sqn | The application sequence number to associate with this message |
flags | Flags indicating various conditions. See next section for possible OR'd set of values. |
LBMException | if any error occurs sending the message. |
void com.latencybusters.lbm.LBMHotFailoverSource.send | ( | ByteBuffer | message, |
int | startPosition, | ||
int | messageLength, | ||
long | sqn, | ||
int | flags, | ||
Object | cbArg | ||
) | throws LBMException |
Send a message to the topic associated with the LBM source.
message | Data to send in this message |
startPosition | Starting position within the buffer to send from |
messageLength | Number of bytes of data to send in this message |
sqn | The application sequence number to associate with this message |
flags | Flags indicating various conditions. See next section for possible OR'd set of values. |
cbArg | Client object to be passed back in stability or confirmation events related to this message (UME only) |
LBMException | if any error occurs sending the message. |
void com.latencybusters.lbm.LBMHotFailoverSource.send | ( | ByteBuffer | message, |
int | startPosition, | ||
int | messageLength, | ||
long | sqn, | ||
int | flags, | ||
LBMSourceSendExInfo | exinfo | ||
) | throws LBMException |
Send a message to the topic associated with the LBM source.
message | Data to send in this message |
startPosition | Starting position within the buffer to send from |
messageLength | Number of bytes of data to send in this message |
sqn | The application sequence number to associate with this message |
flags | Flags indicating various conditions. See next section for possible OR'd set of values. |
exinfo | LBMSourceSendExInfo object, which includes flags to change callback behavior and a client-supplied object to be passed back. (UME only) |
LBMException | if any error occurs sending the message. |
|
inherited |
Send a message to the topic associated with the LBM source.
message | Data to send in this message |
messageLength | Number of bytes of data to send in this message |
flags | Flags indicating various conditions. See next section for possible OR'd set of values. |
LBMException | if any error occurred during sending. |
|
inherited |
Send a message to the topic associated with the LBM source.
message | Data to send in this message |
messageLength | Number of bytes of data to send in this message |
flags | Flags indicating various conditions. See next section for possible OR'd set of values. |
cbArg | Client object to be passed back in stability or confirmation events related to this message (UME only) |
LBMException | if any error occurred during sending. |
|
inherited |
Send a message to the topic associated with the LBM source.
message | Data to send in this message |
messageLength | Number of bytes of data to send in this message |
flags | Flags indicating various conditions. See next section for possible OR'd set of values. |
exinfo | LBMSourceSendExInfo object; used to set callback behavior flags and to pass back a user-supplied object. |
LBMException | if any error occurred during sending. |
|
inherited |
Send a message to the topic associated with the LBM source.
message | Data to send in this message |
startPosition | Starting position within the buffer to send from |
messageLength | Number of bytes of data to send in this message |
flags | Flags indicating various conditions. See next section for possible OR'd set of values. |
LBMException | if any error occurred during sending. |
|
inherited |
Send a message to the topic associated with the LBM source.
message | Data to send in this message |
startPosition | Starting position within the buffer to send from |
messageLength | Number of bytes of data to send in this message |
flags | Flags indicating various conditions. See next section for possible OR'd set of values. |
cbArg | Client object to be passed back in stability or confirmation events related to this message (UME only) |
LBMException | if any error occurred during sending. |
|
inherited |
Send a message to the topic associated with the LBM source.
message | Data to send in this message |
startPosition | Starting position within the buffer to send from |
messageLength | Number of bytes of data to send in this message |
flags | Flags indicating various conditions. See next section for possible OR'd set of values. |
exinfo | LBMSourceSendExInfo object; used to set callback behavior flags and to pass back a user-supplied object. (UME only) |
LBMException | if any error occurred during sending. |
|
inherited |
Send a request message to the topic associated with the LBM source.
lbmreq | LBMRequest object |
flags | Flags indicating various conditions. See next section for possible OR'd set of values. |
LBMException | if any error occurred during sending. |
|
inherited |
Send a request message to the topic associated with the LBM source using an designated event queue for responses.
lbmreq | LBMRequest object |
lbmevq | LBMEventQueue used to handle response messages |
flags | Flags indicating various conditions. See next section for possible OR'd set of values. |
LBMException | if any error occurred during sending. |
|
inherited |
Send a request message to the topic associated with the LBM source using an designated event queue for responses.
lbmreq | LBMRequest object |
lbmevq | LBMEventQueue used to handle response messages |
flags | Flags indicating various conditions. See next section for possible OR'd set of values. |
exinfo | LBMSourceSendExInfo object; used to set callback behavior flags and to pass back a user-supplied object. (UME only) |
LBMException | if any error occurred during sending. |
|
inherited |
Send a request message to the topic associated with the LBM source using an designated event queue for responses.
lbmreq | LBMRequest object |
flags | Flags indicating various conditions. See next section for possible OR'd set of values. |
exinfo | LBMSourceSendExInfo object; used to set callback behavior flags and to pass back a user-supplied object. (UME only) |
LBMException | if any error occurred during sending. |
void com.latencybusters.lbm.LBMHotFailoverSource.sendReceiverReset | ( | int | flags, |
LBMSourceSendExInfo | exinfo | ||
) | throws LBMException |
Send a message that instructs hot-failover receivers to reset their state. In, and only in, the case that hf receivers cannot be manually restarted, this function can be used to allow delivering of previously sent sequence numbers. The hot-failover receiver will deliver a message of type LBM.MSG_HF_RESET and will include the new expected sequence number. The sequence number contained with the reset will be used as the next expected sequence number to be sent.
NOTE: The best way to reset a hot-failover receiver's state is to restart the receiver itself. This function should be used only when that is impossible.
Caution: It is not recommended to call this method from a context thread callback.
Warning: This method should only be used when it is impossible to restart hot failover receivers.
flags | Flags indicating various send conditions. |
exinfo | LBMSourceSendExInfo object which must include the hot failover sequence number to send |
|
inherited |
Send a serialized PB message to the topic associated with the LBM source.
message | ByteBuffer that contains serialized PB stats to send. |
messageLength | Number of bytes in the ByteBuffer. |
statsType | Indicates the type of statistics being sent. See next section for set of possible values. |
LBMException | if any error occurred during sending. |
|
inherited |
Set the value of a source-related attribute for this source. Note that this method bypasses the property list. As such no attributes configured using this method will appear in the property list.
attributeName | Name of the attribute to set |
attributeValue | New attribute value |
LBMException | if attributeName is not a valid attribute, or attributeValue is not a valid value for attributeName . |
Referenced by com.latencybusters.lbm.LBMSource.setProperty().
|
inherited |
Set the current inflight value for this source.
type | The type of flight size |
setInflightCb | Object that implements the LBMSetInflightCallback interface |
clientd | Clientd object passed into the setInflight callback |
LBMException | if an error occurs while setting the inflight value |
Referenced by com.latencybusters.lbm.LBMSource.getInflight().
|
inherited |
Set the current inflight messages and bytes value for this source. The values are set from within the provided set inflight callback with appropriate locking held.
type | The type of flight size |
setInflightCb | Object that implements the LBMSetInflightCallback interface |
clientd | Clientd object passed into the setInflight callback |
LBMException | if an error occurs while setting the inflight value |
Referenced by com.latencybusters.lbm.LBMSource.getInflightEx().
|
inherited |
Set the value of a source-related attribute for this source.
attributeName | Name of the attribute to set |
attributeValue | New attribute value |
LBMRuntimeException | if attributeName is not a valid attribute, or attributeValue is not a valid value for attributeName . |
References com.latencybusters.lbm.LBMSource.setAttributeValue().
Referenced by com.latencybusters.lbm.LBMSource.load().
|
inherited |
Mark a specific sqn as stable, triggering an event if configured to do so, and adjusting the inflight if necessary.
sqn | Sqn of the fragment to mark stable |
LBMException | if an error occurs while marking the fragment stable |
|
inherited |
Deregister this source
Warning: It is not safe to call this method from a context thread callback.
LBMException | if any error occurred during source deletion. |
|
inherited |
This method is for internal use only, and is not supported for customer applications.