UMDS .NET API  6.14
com.latencybusters.umds.UMDSReceiverRecoveryInfo Class Reference

Class to give applications access to persistence-related information, and to allow limited control over persistent recovery. More...

Public Member Functions

 UMDSReceiverRecoveryInfo ()
 Default constructor; initializes all fields to 0.
 
 UMDSReceiverRecoveryInfo (int flags, int lowSequenceNumber, int highSequenceNumber, long srcSessionId, String topic, Object receiverRecoveryInfoCbArg)
 Constructor, initializes fields to the given values. Not for application use. More...
 
int getFlags ()
 Get "flags" field. For future expansion, not currently used. More...
 
int getLowSequenceNumber ()
 Get sequence number for oldest message in UMDS server's message cache for this session ID (persistent source). More...
 
void setLowSequenceNumber (int startSeqNum)
 Set sequence number for starting point for persistent message recovery. More...
 
int getHighSequenceNumber ()
 Get "highSequenceNumber" field. For future expansion, not currently used. More...
 
long getSrcSessionId ()
 Get persistent source's session id. More...
 
Object getReceiverRecoveryInfoCbArg ()
 Get the optional application object passed to UMDSReceiverRecoveryInfoCallback::setReceiverRecoverySequenceNumber(). More...
 
String getTopic ()
 Get Topic string. More...
 
String toString ()
 Create a human-readable string containing the internal state of this object. More...
 

Detailed Description

Class to give applications access to persistence-related information, and to allow limited control over persistent recovery.

An object derived from this class is passed to UMDSPersistentReceiver::UMDSReceiverRecoveryInfoCallback(). That object is used to call back to the application when a persistent registration with the UMDS server is completed.

Methods of interest to applications are:

  • getLowSequenceNumber() - oldest persisted message number available in the UMDS server. Unless overridden by the application, this will typically be the first message recovered.
  • getSrcSessionId() - UM Persistence session ID for this source.
  • getTopic() - Topic string for this source.
  • getReceiverRecoveryInfoCbArg() - Optional arbitrary application object supplied to the UMDSPersistentReceiver() constructor.
  • toString() - creates a printable string with Persistence information.
  • setLowSequenceNumber() - override UMDS's oldest message number with a desired startring point for recovery.

Other methods and internal fields ("flags", "highSequenceNumber") are defined for future expansion but are not currently used.

Because of race conditions, it is possible that the first recovery message delivered to the application will be a later message than the one specified by the lowSequenceNumber.

Constructor & Destructor Documentation

com.latencybusters.umds.UMDSReceiverRecoveryInfo.UMDSReceiverRecoveryInfo ( int  flags,
int  lowSequenceNumber,
int  highSequenceNumber,
long  srcSessionId,
String  topic,
Object  receiverRecoveryInfoCbArg 
)

Constructor, initializes fields to the given values. Not for application use.

Applications do not normally create this object. UMDS creates it internally and passes it to UMDSReceiverRecoveryInfoCallback::setReceiverRecoverySequenceNumber().

Parameters
flagsInformational flags.
lowSequenceNumberLow sequence number (can be changed by the application, must be >= 0).
highSequenceNumberHigh sequence number (can be changed by the application, must be >= 0).
srcSessionIdThe session ID for the source
topicTopic string
receiverRecoveryInfoCbArgOptional arbitrary application object passed to UMDSReceiverRecoveryInfoCallback::setReceiverRecoverySequenceNumber().
Exceptions
UMDSException

Member Function Documentation

int com.latencybusters.umds.UMDSReceiverRecoveryInfo.getFlags ( )

Get "flags" field. For future expansion, not currently used.

Returns
Informational flags.
int com.latencybusters.umds.UMDSReceiverRecoveryInfo.getHighSequenceNumber ( )

Get "highSequenceNumber" field. For future expansion, not currently used.

Returns
high sequence number.

Referenced by com.latencybusters.umds.UMDSServerConnection.send().

int com.latencybusters.umds.UMDSReceiverRecoveryInfo.getLowSequenceNumber ( )

Get sequence number for oldest message in UMDS server's message cache for this session ID (persistent source).

This is the intended starting point for persistent message recovery. The application can override this by calling getLowSequenceNumber().

Returns
low sequence number.

Referenced by com.latencybusters.umds.UMDSServerConnection.send().

Object com.latencybusters.umds.UMDSReceiverRecoveryInfo.getReceiverRecoveryInfoCbArg ( )

Get the optional application object passed to UMDSReceiverRecoveryInfoCallback::setReceiverRecoverySequenceNumber().

Returns
application object.
long com.latencybusters.umds.UMDSReceiverRecoveryInfo.getSrcSessionId ( )

Get persistent source's session id.

Note that the session id is an unsigned 64 bit value, represented here as a signed long.

Returns
The source's session ID

Referenced by com.latencybusters.umds.UMDSServerConnection.send().

String com.latencybusters.umds.UMDSReceiverRecoveryInfo.getTopic ( )

Get Topic string.

Returns
topic string.

Referenced by com.latencybusters.umds.UMDSServerConnection.send().

void com.latencybusters.umds.UMDSReceiverRecoveryInfo.setLowSequenceNumber ( int  startSeqNum)

Set sequence number for starting point for persistent message recovery.

Overrides the low sequence number supplied by the UMDS server.

Parameters
startSeqNumDesired starting sequence number for recovery (must be >= 0).
String com.latencybusters.umds.UMDSReceiverRecoveryInfo.toString ( )

Create a human-readable string containing the internal state of this object.

Returns
printable string.

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