UM Java API 6.17.1

- Main Page
- Related Pages
- Classes

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | List of all members
com.latencybusters.lbm.LBMSource Class Reference
Inheritance diagram for com.latencybusters.lbm.LBMSource:

## Public Member Functions
| LBMSource (LBMContext lbmctx, LBMTopic lbmtopic) throws LBMException
| LBMSource (LBMContext lbmctx, LBMTopic lbmtopic, LBMSourceEventCallback cb, Object cbArg) throws LBMException
| LBMSource (LBMContext lbmctx, LBMTopic lbmtopic, LBMEventQueue lbmevq) throws LBMException
| LBMSource (LBMContext lbmctx, LBMTopic lbmtopic, LBMSourceEventCallback cb, Object cbArg, LBMEventQueue lbmevq) throws LBMException
void | umederegister () throws LBMException
void | unblock () 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)

## Detailed Description

LBM Source class.

Warning: It is not safe to instantiate this object from a context thread callback.

## Constructor & Destructor Documentation

com.latencybusters.lbm.LBMSource.LBMSource | ( | LBMContext | lbmctx,
|  | LBMTopic | lbmtopic
| ) |  | throws LBMException

Instantiate an LBM Source object associated with a given context and topic.

Warning: It is not safe to call this constructor from a context thread callback.

Parameters

  lbmctx | Context with which to associate the source.
  lbmtopic | LBMTopic used to initialize the source.

Exceptions

  LBMException | if any error occurred during source creation.

References com.latencybusters.lbm.LBM.EINVAL.

com.latencybusters.lbm.LBMSource.LBMSource | ( | LBMContext | lbmctx,
|  | LBMTopic | lbmtopic,
|  | LBMSourceEventCallback | cb,
|  | Object | cbArg
| ) |  | throws LBMException

Instantiate an LBM 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.

Parameters

  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

Exceptions

  LBMException | if any error occurred during source creation.

References com.latencybusters.lbm.LBMSource.addSourceCallback(), and com.latencybusters.lbm.LBM.EINVAL.

com.latencybusters.lbm.LBMSource.LBMSource | ( | LBMContext | lbmctx,
|  | LBMTopic | lbmtopic,
|  | LBMEventQueue | lbmevq
| ) |  | throws LBMException

Instantiate an LBM 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.

Parameters

  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).

Exceptions

  LBMException | if any error occurred during source creation.

References com.latencybusters.lbm.LBM.EINVAL.

com.latencybusters.lbm.LBMSource.LBMSource | ( | LBMContext | lbmctx,
|  | LBMTopic | lbmtopic,
|  | LBMSourceEventCallback | cb,
|  | Object | cbArg,
|  | LBMEventQueue | lbmevq
| ) |  | throws LBMException

Instantiate an LBM 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.

Parameters

  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).

Exceptions

  LBMException | if any error occurred during source creation.

References com.latencybusters.lbm.LBMSource.addSourceCallback(), and com.latencybusters.lbm.LBM.EINVAL.

## Member Function Documentation

int com.latencybusters.lbm.LBMSource.acquireMessageBufferPosition | ( | final int | messageLength,
|  | final int | flags
| ) |  | throws LBMException

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.

Parameters

  messageLength | Length in bytes to reserve in the messages buffer
  flags | Source send flags

Returns
  Position into the source messages buffer getMessagesBuffer() or -1 if Non-blocking and send would block.

Exceptions

  LBMException | If an error occurs

See also
  LBM::SRC_NONBLOCK
  LBM::SRC_BLOCK

Referenced by com.latencybusters.lbm.LBMSource.getMessagesBuffer(), and com.latencybusters.lbm.LBMSource.messageBuffersCompleteAndAcquirePosition().

void com.latencybusters.lbm.LBMSource.addSourceCallback | ( | LBMSourceEventCallback | cb | ) |

Register a source event callback

Parameters

  cb | Object implementing the LBMSourceEventCallback interface

See also
  LBMSourceEventCallback
  removeSourceCallback

Referenced by com.latencybusters.lbm.LBMHotFailoverSource.LBMHotFailoverSource(), and com.latencybusters.lbm.LBMSource.LBMSource().

void com.latencybusters.lbm.LBMSource.addSourceCallback | ( | LBMSourceEventCallback | cb,
|  | Object | cbArg
| ) |  |

Register a source event callback (and callback token)

Parameters

  cb | Object implementing the LBMSourceEventCallback interface
  cbArg | Callback token object

See also
  LBMSourceEventCallback
  removeSourceCallback

void com.latencybusters.lbm.LBMSource.close | ( |  | ) | throws LBMException

Close this source

Warning: It is not safe to call this method from a context thread callback.

Exceptions

  LBMException | if any error occurred during source deletion.

Referenced by com.latencybusters.lbm.LBMSource.finalize().

LBMSourceChannelInfo com.latencybusters.lbm.LBMSource.createChannel | ( | long | channelNumber | ) | throws LBMException

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.

Parameters

  channelNumber | Channel number in the range 0-4294967295

Returns
  A new LBMSourceChannelInfo object

See also
  LBMSourceChannelInfo
  deleteChannel

void com.latencybusters.lbm.LBMSource.deleteChannel | ( | LBMSourceChannelInfo | channelInfo | ) | throws LBMException

Delete a channel object

Parameters

  channelInfo | A channelInfo object

See also
  LBMSourceChannelInfo
  createChannel

LBMConfigOption [] com.latencybusters.lbm.LBMSource.dumpAttributeList | ( |  | ) |

Returns an array of LBMConfigOptions

Returns
  Array of LBMConfigOption

void com.latencybusters.lbm.LBMSource.finalize | ( |  | ) | throws LBMException
| protected

This method is for internal use only, and is not supported for customer applications.

References com.latencybusters.lbm.LBMSource.close().

void com.latencybusters.lbm.LBMSource.flush | ( |  | ) | throws LBMException

Send messages from both the explicit and implicit batches ASAP.

Note
  calling lbm_src_flush() for a given source effectively flushes the implicit batcher for all sources on the same transport session.

Warning
  Do not call this function from a context thread callback. It can result in deadlock.

Exceptions

  LBMException | if any error occurred during sending.

References com.latencybusters.lbm.LBMSource.messageBuffersComplete(), and com.latencybusters.lbm.LBMSource.onResponse().

String com.latencybusters.lbm.LBMSource.getAttributeValue | ( | String | attributeName | ) | throws LBMException

Returns the value of a source-related attribute for this source.

Parameters

  attributeName | Name of the attribute to retrieve

Returns
  Value corresponding to the specified attribute name

Exceptions

  LBMException | if `attributeName` is not a valid attribute.

int com.latencybusters.lbm.LBMSource.getInflight | ( | int | type | ) | throws LBMException

Get the current inflight value for this source

Parameters

  type | The type of flight size

See also
  LBM::FLIGHT_SIZE_TYPE_UME
  LBM::FLIGHT_SIZE_TYPE_ULB
  LBM::FLIGHT_SIZE_TYPE_UMQ

Returns
  the inflight value

Exceptions

  LBMException | if an error occurs while retrieving the inflight value

References com.latencybusters.lbm.LBMSource.setInflight().

LBMFlightSizeInflightInfo com.latencybusters.lbm.LBMSource.getInflightEx | ( | int | type | ) | throws LBMException

Get the current inflight values of messages and bytes for this source

Parameters

  type | The type of flight size

See also
  LBM::FLIGHT_SIZE_TYPE_UME
  LBM::FLIGHT_SIZE_TYPE_ULB
  LBM::FLIGHT_SIZE_TYPE_UMQ

Returns
  the inflight value

Exceptions

  LBMException | if an error occurs while retrieving the inflight value

References com.latencybusters.lbm.LBMSource.setInflightEx().

ByteBuffer com.latencybusters.lbm.LBMSource.getMessagesBuffer | ( |  | ) | throws LBMException

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.

Returns
  A DirectByteBuffer view of the transport window

References com.latencybusters.lbm.LBMSource.acquireMessageBufferPosition(), and com.latencybusters.lbm.LBMSource.messageBuffersComplete().

LBMSourceStatistics com.latencybusters.lbm.LBMSource.getStatistics | ( |  | ) | throws LBMException

Return the current set of source transport statistics for this source.

Returns
  LBMSourceStatistics object containing the statistics corresponding to this source.

Exceptions

  LBMException | if any error occurred retrieving source statistics.

References com.latencybusters.lbm.LBMSourceStatistics.refresh().

boolean com.latencybusters.lbm.LBMSource.isClosed | ( |  | ) |

Returns boolean describing whether this instance has a reference to a valid C source

Returns
  boolean describing whether this instance has a reference to a valid C source

void com.latencybusters.lbm.LBMSource.load | ( | InputStream | inStream | ) | throws IOException

Reads a property (attribute) list (key and element pairs) from the input stream.

Parameters

  inStream | Input stream of bytes

Exceptions

  IOException | if any I/O error occurs.
  LBMRuntimeException | if any invalid attribute is detected in `inStream`.

References com.latencybusters.lbm.LBMSource.setProperty().

void com.latencybusters.lbm.LBMSource.messageBuffersCancel | ( |  | ) | throws LBMException

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.

See also
  acquireMessageBufferPosition(final int, final int)
  messageBuffersCompleteAndAcquirePosition(final int, final int)

Exceptions

  LBMException |

References com.latencybusters.lbm.LBM.EOS.

void com.latencybusters.lbm.LBMSource.messageBuffersComplete | ( |  | ) | throws LBMException

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.

Exceptions

  LBMException |

See also
  acquireMessageBufferPosition(final int, final int)
  messageBuffersCompleteAndAcquirePosition(final int, final int)

Referenced by com.latencybusters.lbm.LBMSource.flush(), and com.latencybusters.lbm.LBMSource.getMessagesBuffer().

int com.latencybusters.lbm.LBMSource.messageBuffersCompleteAndAcquirePosition | ( | final int | messageLength,
|  | final int | flags
| ) |  | throws LBMException

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.

Parameters

  messageLength | - length in bytes to reserve in the messages buffer
  flags | - Source send flags

Returns
  Position into the source messages buffer getMessagesBuffer() or -1 if Non-blocking and send would block.

Exceptions

  LBMException |

See also
  LBM::SRC_NONBLOCK
  LBM::SRC_BLOCK

References com.latencybusters.lbm.LBMSource.acquireMessageBufferPosition().

int com.latencybusters.lbm.LBMSource.onResponse | ( | LBMRequest | lbmreq,
|  | LBMMessage | lbmmsg
| ) |  |
| protected

Default response message callback, which calls the interface specified when the request was sent. This method may be overridden by subclassing the LBMSource class.

Parameters

  lbmreq | LBMRequest object returned by corresponding send call
  lbmmsg | LBMMessage object containing the response data

Returns
  an int, which should always be 0.

See also
  send(LBMRequest, int)
  send(LBMRequest, LBMEventQueue, int)

Referenced by com.latencybusters.lbm.LBMSource.flush().

int com.latencybusters.lbm.LBMSource.onSourceEvent | ( | LBMSourceEvent | sourceEvent | ) |
| protected

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()).

Parameters

  sourceEvent | LBMSourceEvent object containing information about the posted source-related event.

Returns
  an int, which is always 0.

See also
  LBMSourceEvent
  addSourceCallback
  removeSourceCallback

References com.latencybusters.lbm.LBMSourceEventCallback.onSourceEvent(), and com.latencybusters.lbm.LBMSourceEvent.promote().

void com.latencybusters.lbm.LBMSource.removeSourceCallback | ( | LBMSourceEventCallback | cb | ) |

Deregister a source event callback

Parameters

  cb | Previously registered object implementing the LBMSourceEventCallback interface

See also
  LBMSourceEventCallback
  addSourceCallback

void com.latencybusters.lbm.LBMSource.removeSourceCallback | ( | LBMSourceEventCallback | cb,
|  | Object | cbArg
| ) |  |

Deregister a source event callback (and callback token)

Parameters

  cb | Previously registered object implementing the LBMSourceEventCallback interface
  cbArg | Callback token object

See also
  LBMSourceEventCallback
  addSourceCallback

void com.latencybusters.lbm.LBMSource.resetStatistics | ( |  | ) | throws LBMException

Reset the transport statistics for this source.

Exceptions

  LBMException | if any error occurred resetting source statistics.

void com.latencybusters.lbm.LBMSource.send | ( | byte [] | message,
|  | int | messageLength,
|  | int | flags
| ) |  | throws LBMException

Send a message to the topic associated with the LBM source.

Note
  If called from a context thread callback, use the LBM_SRC_NONBLOCK flag and handle any LBM_EWOULDBLOCK errors internally.

Warning
  Do not call this function from a context thread callback for persistence stability or persistence confirmation events. It can result in deadlock.

Parameters

  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.

Exceptions

  LBMException | if any error occurred during sending.

See also
  LBM::MSG_START_BATCH
  LBM::MSG_END_BATCH
  LBM::MSG_COMPLETE_BATCH
  LBM::MSG_FLUSH
  LBM::SRC_NONBLOCK
  LBM::SRC_BLOCK
  LBM::SRC_EVENT_UME_MESSAGE_STABLE
  LBM::SRC_EVENT_UME_DELIVERY_CONFIRMATION

void com.latencybusters.lbm.LBMSource.send | ( | byte [] | message,
|  | int | messageLength,
|  | int | flags,
|  | Object | cbArg
| ) |  | throws LBMException

Send a message to the topic associated with the LBM source.

Note
  If called from a context thread callback, use the LBM_SRC_NONBLOCK flag and handle any LBM_EWOULDBLOCK errors internally.

Warning
  Do not call this function from a context thread callback for persistence stability or persistence confirmation events. It can result in deadlock.

Parameters

  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)

Exceptions

  LBMException | if any error occurred during sending.

See also
  LBM::MSG_START_BATCH
  LBM::MSG_END_BATCH
  LBM::MSG_COMPLETE_BATCH
  LBM::MSG_FLUSH
  LBM::SRC_NONBLOCK
  LBM::SRC_BLOCK
  LBM::SRC_EVENT_UME_MESSAGE_STABLE
  LBM::SRC_EVENT_UME_DELIVERY_CONFIRMATION

Deprecated:
  This method exists for backwards compatibility but should not be used. The send method that accepts an LBMSourceSendExInfo object should be used instead.

void com.latencybusters.lbm.LBMSource.send | ( | byte [] | message,
|  | int | messageLength,
|  | int | flags,
|  | LBMSourceSendExInfo | exinfo
| ) |  | throws LBMException

Send a message to the topic associated with the LBM source.

Note
  If called from a context thread callback, use the LBM_SRC_NONBLOCK flag and handle any LBM_EWOULDBLOCK errors internally.

Warning
  Do not call this function from a context thread callback for persistence stability or persistence confirmation events. It can result in deadlock.

Parameters

  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.

Exceptions

  LBMException | if any error occurred during sending.

See also
  LBM::MSG_START_BATCH
  LBM::MSG_END_BATCH
  LBM::MSG_COMPLETE_BATCH
  LBM::MSG_FLUSH
  LBM::SRC_NONBLOCK
  LBM::SRC_BLOCK
  LBM::SRC_EVENT_UME_MESSAGE_STABLE
  LBM::SRC_EVENT_UME_DELIVERY_CONFIRMATION
  LBMSourceSendExInfo

Since
  UME 2.0

void com.latencybusters.lbm.LBMSource.send | ( | ByteBuffer | message,
|  | int | startPosition,
|  | int | messageLength,
|  | int | flags
| ) |  | throws LBMException

Send a message to the topic associated with the LBM source.

Note
  If called from a context thread callback, use the LBM_SRC_NONBLOCK flag and handle any LBM_EWOULDBLOCK errors internally.

Warning
  Do not call this function from a context thread callback for persistence stability or persistence confirmation events. It can result in deadlock.

Parameters

  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.

Exceptions

  LBMException | if any error occurred during sending.

See also
  LBM::MSG_START_BATCH
  LBM::MSG_END_BATCH
  LBM::MSG_COMPLETE_BATCH
  LBM::MSG_FLUSH
  LBM::SRC_NONBLOCK
  LBM::SRC_BLOCK
  LBM::SRC_EVENT_UME_MESSAGE_STABLE
  LBM::SRC_EVENT_UME_DELIVERY_CONFIRMATION

void com.latencybusters.lbm.LBMSource.send | ( | ByteBuffer | message,
|  | int | startPosition,
|  | int | messageLength,
|  | int | flags,
|  | Object | cbArg
| ) |  | throws LBMException

Send a message to the topic associated with the LBM source.

Note
  If called from a context thread callback, use the LBM_SRC_NONBLOCK flag and handle any LBM_EWOULDBLOCK errors internally.

Warning
  Do not call this function from a context thread callback for persistence stability or persistence confirmation events. It can result in deadlock.

Parameters

  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)

Exceptions

  LBMException | if any error occurred during sending.

See also
  LBM::MSG_START_BATCH
  LBM::MSG_END_BATCH
  LBM::MSG_COMPLETE_BATCH
  LBM::MSG_FLUSH
  LBM::SRC_NONBLOCK
  LBM::SRC_BLOCK
  LBM::SRC_EVENT_UME_MESSAGE_STABLE
  LBM::SRC_EVENT_UME_DELIVERY_CONFIRMATION

Deprecated:
  This method exists for backwards compatibility but should not be used. The send method that accepts an LBMSourceSendExInfo object should be used instead.

void com.latencybusters.lbm.LBMSource.send | ( | ByteBuffer | message,
|  | int | startPosition,
|  | int | messageLength,
|  | int | flags,
|  | LBMSourceSendExInfo | exinfo
| ) |  | throws LBMException

Send a message to the topic associated with the LBM source.

Note
  If called from a context thread callback, use the LBM_SRC_NONBLOCK flag and handle any LBM_EWOULDBLOCK errors internally.

Warning
  Do not call this function from a context thread callback for persistence stability or persistence confirmation events. It can result in deadlock.

Parameters

  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)

Exceptions

  LBMException | if any error occurred during sending.

See also
  LBM::MSG_START_BATCH
  LBM::MSG_END_BATCH
  LBM::MSG_COMPLETE_BATCH
  LBM::MSG_FLUSH
  LBM::SRC_NONBLOCK
  LBM::SRC_BLOCK
  LBM::SRC_EVENT_UME_MESSAGE_STABLE
  LBM::SRC_EVENT_UME_DELIVERY_CONFIRMATION
  LBMSourceSendExInfo

Since
  UME 2.0

void com.latencybusters.lbm.LBMSource.send | ( | LBMRequest | lbmreq,
|  | int | flags
| ) |  | throws LBMException

Send a request message to the topic associated with the LBM source.

Note
  If called from a context thread callback, use the LBM_SRC_NONBLOCK flag and handle any LBM_EWOULDBLOCK errors internally.

Warning
  Do not call this function from a context thread callback for persistence stability or persistence confirmation events. It can result in deadlock.

Parameters

  lbmreq | LBMRequest object
  flags | Flags indicating various conditions. See next section for possible OR'd set of values.

Exceptions

  LBMException | if any error occurred during sending.

See also
  LBM::MSG_START_BATCH
  LBM::MSG_END_BATCH
  LBM::MSG_COMPLETE_BATCH
  LBM::MSG_FLUSH
  LBM::SRC_NONBLOCK
  LBM::SRC_BLOCK

void com.latencybusters.lbm.LBMSource.send | ( | LBMRequest | lbmreq,
|  | LBMEventQueue | lbmevq,
|  | int | flags
| ) |  | throws LBMException

Send a request message to the topic associated with the LBM source using an designated event queue for responses.

Note
  If called from a context thread callback, use the LBM_SRC_NONBLOCK flag and handle any LBM_EWOULDBLOCK errors internally.

Warning
  Do not call this function from a context thread callback for persistence stability or persistence confirmation events. It can result in deadlock.

Parameters

  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.

Exceptions

  LBMException | if any error occurred during sending.

See also
  LBM::MSG_START_BATCH
  LBM::MSG_END_BATCH
  LBM::MSG_COMPLETE_BATCH
  LBM::MSG_FLUSH
  LBM::SRC_NONBLOCK
  LBM::SRC_BLOCK

void com.latencybusters.lbm.LBMSource.send | ( | LBMRequest | lbmreq,
|  | LBMEventQueue | lbmevq,
|  | int | flags,
|  | LBMSourceSendExInfo | exinfo
| ) |  | throws LBMException

Send a request message to the topic associated with the LBM source using an designated event queue for responses.

Note
  If called from a context thread callback, use the LBM_SRC_NONBLOCK flag and handle any LBM_EWOULDBLOCK errors internally.

Warning
  Do not call this function from a context thread callback for persistence stability or persistence confirmation events. It can result in deadlock.

Parameters

  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)

Exceptions

  LBMException | if any error occurred during sending.

See also
  LBM::MSG_START_BATCH
  LBM::MSG_END_BATCH
  LBM::MSG_COMPLETE_BATCH
  LBM::MSG_FLUSH
  LBM::SRC_NONBLOCK
  LBM::SRC_BLOCK

void com.latencybusters.lbm.LBMSource.send | ( | LBMRequest | lbmreq,
|  | int | flags,
|  | LBMSourceSendExInfo | exinfo
| ) |  | throws LBMException

Send a request message to the topic associated with the LBM source using an designated event queue for responses.

Note
  If called from a context thread callback, use the LBM_SRC_NONBLOCK flag and handle any LBM_EWOULDBLOCK errors internally.

Warning
  Do not call this function from a context thread callback for persistence stability or persistence confirmation events. It can result in deadlock.

Parameters

  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)

Exceptions

  LBMException | if any error occurred during sending.

See also
  LBM::MSG_START_BATCH
  LBM::MSG_END_BATCH
  LBM::MSG_COMPLETE_BATCH
  LBM::MSG_FLUSH
  LBM::SRC_NONBLOCK
  LBM::SRC_BLOCK

void com.latencybusters.lbm.LBMSource.sendStatistics | ( | ByteBuffer | message,
|  | int | messageLength,
|  | int | statsType
| ) |  | throws LBMException

Send a serialized PB message to the topic associated with the LBM source.

Parameters

  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.

Exceptions

  LBMException | if any error occurred during sending.

See also
  LBMMonitor::LBMMON_PACKET_TYPE_SOURCE
  LBMMonitor::LBMMON_PACKET_TYPE_RECEIVER
  LBMMonitor::LBMMON_PACKET_TYPE_EVENT_QUEUE
  LBMMonitor::LBMMON_PACKET_TYPE_CONTEXT
  LBMMonitor::LBMMON_PACKET_TYPE_RECEIVER_TOPIC
  LBMMonitor::LBMMON_PACKET_TYPE_WILDCARD_RECEIVER
  LBMMonitor::LBMMON_PACKET_TYPE_UMESTORE
  LBMMonitor::LBMMON_PACKET_TYPE_GATEWAY
  LBMMonitor::LBMMON_PACKET_TYPE_UMDS
  LBMMonitor::LBMMON_PACKET_TYPE_SRS

void com.latencybusters.lbm.LBMSource.setAttributeValue | ( | String | attributeName,
|  | String | attributeValue
| ) |  | throws LBMException

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.

Parameters

  attributeName | Name of the attribute to set
  attributeValue | New attribute value

Exceptions

  LBMException | if `attributeName` is not a valid attribute, or `attributeValue` is not a valid value for `attributeName`.

See also
  setProperty

Referenced by com.latencybusters.lbm.LBMSource.setProperty().

int com.latencybusters.lbm.LBMSource.setInflight | ( | int | type,
|  | LBMSetInflightCallback | setInflightCb,
|  | Object | clientd
| ) |  | throws LBMException

Set the current inflight value for this source.

Parameters

  type | The type of flight size

See also
  LBM::FLIGHT_SIZE_TYPE_UME
  LBM::FLIGHT_SIZE_TYPE_ULB
  LBM::FLIGHT_SIZE_TYPE_UMQ

Parameters

  setInflightCb | Object that implements the LBMSetInflightCallback interface
  clientd | Clientd object passed into the setInflight callback

Returns
  the new inflight value

Exceptions

  LBMException | if an error occurs while setting the inflight value

Referenced by com.latencybusters.lbm.LBMSource.getInflight().

LBMFlightSizeInflightInfo com.latencybusters.lbm.LBMSource.setInflightEx | ( | int | type,
|  | LBMSetInflightCallback | setInflightCb,
|  | Object | clientd
| ) |  | throws LBMException

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.

Parameters

  type | The type of flight size

See also
  LBM::FLIGHT_SIZE_TYPE_UME
  LBM::FLIGHT_SIZE_TYPE_ULB
  LBM::FLIGHT_SIZE_TYPE_UMQ

Parameters

  setInflightCb | Object that implements the LBMSetInflightCallback interface
  clientd | Clientd object passed into the setInflight callback

Returns
  the new inflight values

Exceptions

  LBMException | if an error occurs while setting the inflight value

Referenced by com.latencybusters.lbm.LBMSource.getInflightEx().

Object com.latencybusters.lbm.LBMSource.setProperty | ( | String | attributeName,
|  | String | attributeValue
| ) |  |

Set the value of a source-related attribute for this source.

Parameters

  attributeName | Name of the attribute to set
  attributeValue | New attribute value

Exceptions

  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().

void com.latencybusters.lbm.LBMSource.setUMEMessageStable | ( | long | sqn | ) | throws LBMException

Mark a specific sqn as stable, triggering an event if configured to do so, and adjusting the inflight if necessary.

Parameters

  sqn | Sqn of the fragment to mark stable

Exceptions

  LBMException | if an error occurs while marking the fragment stable

void com.latencybusters.lbm.LBMSource.umederegister | ( |  | ) | throws LBMException

Deregister this source

Warning: It is not safe to call this method from a context thread callback.

Exceptions

  LBMException | if any error occurred during source deletion.

void com.latencybusters.lbm.LBMSource.unblock | ( |  | ) | throws LBMException

This method is for internal use only, and is not supported for customer applications.

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

- LBMSource.java