com.latencybusters.lbm
Class LBMHotFailoverSource

java.lang.Object
  extended by java.util.Dictionary<K,V>
      extended by java.util.Hashtable<java.lang.Object,java.lang.Object>
          extended by java.util.Properties
              extended by com.latencybusters.lbm.LBMSource
                  extended by com.latencybusters.lbm.LBMHotFailoverSource
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.Object,java.lang.Object>

public class LBMHotFailoverSource
extends LBMSource

LBM Hot-Failover Source class.

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

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.Properties
defaults
 
Constructor Summary
LBMHotFailoverSource(LBMContext lbmctx, LBMTopic lbmtopic)
          Instantiate an LBM Hot-Failover Source object associated with a given context and topic.
LBMHotFailoverSource(LBMContext lbmctx, LBMTopic lbmtopic, LBMEventQueue lbmevq)
          Instantiate an LBM Hot-Failover Source object associated with a given context, topic, and event queue.
LBMHotFailoverSource(LBMContext lbmctx, LBMTopic lbmtopic, LBMSourceEventCallback cb, java.lang.Object cbArg)
          Instantiate an LBM Hot-Failover Source object associated with a given context and topic and initialize source event callback.
LBMHotFailoverSource(LBMContext lbmctx, LBMTopic lbmtopic, LBMSourceEventCallback cb, java.lang.Object cbArg, LBMEventQueue lbmevq)
          Instantiate an LBM Hot-Failover Source object associated with a given context, topic, and event queue and initialize source event callback.
 
Method Summary
protected  void finalize()
           
 void send(byte[] message, int messageLength, long sqn, int flags)
          Send a message to the topic associated with the LBM source.
 void send(byte[] message, int messageLength, long sqn, int flags, LBMSourceSendExInfo exinfo)
          Send a message to the topic associated with the LBM source.
 void send(byte[] message, int messageLength, long sqn, int flags, java.lang.Object cbArg)
          Send a message to the topic associated with the LBM source.
 void send(java.nio.ByteBuffer message, int startPosition, int messageLength, long sqn, int flags)
          Send a message to the topic associated with the LBM source.
 void send(java.nio.ByteBuffer message, int startPosition, int messageLength, long sqn, int flags, LBMSourceSendExInfo exinfo)
          Send a message to the topic associated with the LBM source.
 void send(java.nio.ByteBuffer message, int startPosition, int messageLength, long sqn, int flags, java.lang.Object cbArg)
          Send a message to the topic associated with the LBM source.
 void sendReceiverReset(int flags, LBMSourceSendExInfo exinfo)
          Send a message that instructs hot-failover receivers to reset their state.
 
Methods inherited from class com.latencybusters.lbm.LBMSource
addSourceCallback, addSourceCallback, close, createChannel, deleteChannel, dumpAttributeList, flush, getAttributeValue, getInflight, getInflightEx, getStatistics, isClosed, load, onResponse, onSourceEvent, removeSourceCallback, removeSourceCallback, resetStatistics, send, send, send, send, send, send, send, send, send, send, setAttributeValue, setInflight, setInflightEx, setProperty, setUMEMessageStable, umederegister
 
Methods inherited from class java.util.Properties
getProperty, getProperty, list, list, load, loadFromXML, propertyNames, save, store, store, storeToXML, storeToXML, stringPropertyNames
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LBMHotFailoverSource

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

Parameters:
lbmctx - Context with which to associate the source.
lbmtopic - LBMTopic used to initialize the source.
Throws:
LBMException - if any error occurs creating the hot failover source.

LBMHotFailoverSource

public LBMHotFailoverSource(LBMContext lbmctx,
                            LBMTopic lbmtopic,
                            LBMSourceEventCallback cb,
                            java.lang.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.

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
Throws:
LBMException - if any error occurs creating the hot failover source.

LBMHotFailoverSource

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

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).
Throws:
LBMException - if any error occurs creating the hot failover source.

LBMHotFailoverSource

public LBMHotFailoverSource(LBMContext lbmctx,
                            LBMTopic lbmtopic,
                            LBMSourceEventCallback cb,
                            java.lang.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.

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).
Throws:
LBMException - if any error occurs creating the hot failover source.
Method Detail

finalize

protected void finalize()
                 throws LBMException
Overrides:
finalize in class LBMSource
Throws:
LBMException

send

public void send(byte[] message,
                 int messageLength,
                 long sqn,
                 int flags)
          throws LBMException
Send a message to the topic associated with the LBM source.

Caution: It is not recommended to call this method from a context thread callback.

Parameters:
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.
Throws:
LBMException - if any error occurs sending the message.
See Also:
LBM.MSG_START_BATCH, LBM.MSG_END_BATCH, LBM.MSG_COMPLETE_BATCH, LBM.MSG_FLUSH, LBM.SRC_NONBLOCK, LBM.SRC_BLOCK

send

public void send(byte[] message,
                 int messageLength,
                 long sqn,
                 int flags,
                 java.lang.Object cbArg)
          throws LBMException
Send a message to the topic associated with the LBM source.

Caution: It is not recommended to call this method from a context thread callback.

Warning (UME only): Calling this method from a context thread callback for stability and confirmation events could cause a deadlock.

Parameters:
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)
Throws:
LBMException - if any error occurs sending the message.
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

send

public void send(byte[] message,
                 int messageLength,
                 long sqn,
                 int flags,
                 LBMSourceSendExInfo exinfo)
          throws LBMException
Send a message to the topic associated with the LBM source.

Caution: It is not recommended to call this method from a context thread callback.

Warning (UME only): Calling this method from a context thread callback for stability and confirmation events could cause a deadlock.

Parameters:
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)
Throws:
LBMException - if any error occurs sending the message.
Since:
UME 2.0
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_MESSAGE_STABLE_EX, LBM.SRC_EVENT_UME_DELIVERY_CONFIRMATION, LBM.SRC_EVENT_UME_DELIVERY_CONFIRMATION_EX, LBMSourceSendExInfo

send

public void send(java.nio.ByteBuffer message,
                 int startPosition,
                 int messageLength,
                 long sqn,
                 int flags)
          throws LBMException
Send a message to the topic associated with the LBM source.

Caution: It is not recommended to call this method from a context thread callback.

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
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.
Throws:
LBMException - if any error occurs sending the message.
See Also:
LBM.MSG_START_BATCH, LBM.MSG_END_BATCH, LBM.MSG_COMPLETE_BATCH, LBM.MSG_FLUSH, LBM.SRC_NONBLOCK, LBM.SRC_BLOCK

send

public void send(java.nio.ByteBuffer message,
                 int startPosition,
                 int messageLength,
                 long sqn,
                 int flags,
                 java.lang.Object cbArg)
          throws LBMException
Send a message to the topic associated with the LBM source.

Caution: It is not recommended to call this method from a context thread callback.

Warning (UME only): Calling this method from a context thread callback for stability and confirmation events could cause a 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
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)
Throws:
LBMException - if any error occurs sending the message.
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

send

public void send(java.nio.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.

Caution: It is not recommended to call this method from a context thread callback.

Warning (UME only): Calling this method from a context thread callback for stability and confirmation events could cause a 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
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)
Throws:
LBMException - if any error occurs sending the message.
Since:
UME 2.0
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_MESSAGE_STABLE_EX, LBM.SRC_EVENT_UME_DELIVERY_CONFIRMATION, LBM.SRC_EVENT_UME_DELIVERY_CONFIRMATION_EX, LBMSourceSendExInfo

sendReceiverReset

public void 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. (UME only): Calling this method from a context thread callback for stability and confirmation events could cause a deadlock.

Parameters:
flags - Flags indicating various send conditions.
exinfo - LBMSourceSendExInfo object which must include the hot failover sequence number to send
Throws:
LBMException


All of the documentation and software included in this and any other Informatica Inc "Ultra Messaging" Release is Copyright (C) 2004-2014, Informatica Corporation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted only as covered by the terms of a valid software license agreement with 29West Inc. Copyright © 2004-2014, Informatica, Inc. All Rights Reserved.