|
||||||||||
| PREV CLASS NEXT CLASS | All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.teraspaces.qwfix.FIXSessionPersistence
public final class FIXSessionPersistence
Represents a persistent storage of the FIX message log of a FIXSession. This class cannot be inherited.
| Method Summary | |
|---|---|
static boolean |
exists(String logPath,
String persistenceName)
Determines whether the specified FIXSessionPersistence exists. |
static boolean |
existsPartially(String logPath,
String persistenceName)
Determines whether any file name that represent the specified FIXSessionPersistence exists. |
int |
getEnginePersistenceID()
Gets the zero based index of the current persistence in FIXEngine.getSessionPersistences(). |
int |
getExpectedIncomingSeq()
Gets the expected message sequence number to be received from the recipient. |
int |
getGlobalPersistenceID()
Gets the zero based global index of this persistence in FIXEngine.getGlobalSessionPersistences(). |
int |
getMaximumIncomingSeq()
Gets the maximum sequence number received from the recipient. |
int |
getNextOutgoingAdminQueueSeq()
Gets the next sequence number of the outgoing administrative message queue. |
int |
getNextOutgoingAppQueueSeq()
Gets the next sequence number of the outgoing application message queue. |
int |
getNextSendingSeq()
Gets the "real" message sequence number that can be assigned to the next FIXMessage to the recipient over the wire. |
FIXMessage |
getOutgoingAdminMessage(int internalSeq)
Gets the sent administrative message by specified internal sequence number. |
FIXMessage |
getOutgoingAppMessage(int internalSeq)
Gets the sent application message. |
String |
getPersistenceName()
Gets the name of the persistence. |
FIXMessage |
getReceivedMessage(int msgSeqNum)
Gets the received message by specified MsgSeqNum. |
FIXMessage |
getSentMessage(int msgSeqNum)
Gets the outgoing message by specified actual MsgSeqNum. |
FIXSession |
getSession()
Gets the session. |
int |
getSessionPersistenceID()
Gets the zero based index of the current persistence in FIXSession.getPersistences(). |
DateTime |
getStartTimeUtc()
Gets the start time in UTC format. |
boolean |
isActive()
Gets a value indicating whether this instance is active. |
boolean |
isCurrentActive()
Gets a value indicating whether this instance is currently active. |
static void |
move(String logPath,
String sourcePersistenceName,
String destPersistenceName)
Renames the specified persistence. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static boolean exists(String logPath,
String persistenceName)
logPath - the log pathpersistenceName - the persistence name
public static boolean existsPartially(String logPath,
String persistenceName)
logPath - the log pathpersistenceName - the persistence name
public static void move(String logPath,
String sourcePersistenceName,
String destPersistenceName)
logPath - the log pathsourcePersistenceName - the source persistence namedestPersistenceName - the destination persistence namepublic FIXSession getSession()
public String getPersistenceName()
public boolean isCurrentActive()
A FIXSession may have at most one currently active FIXSessionPersistence (see IsCurrentActive), while a FIXSession may have more than one Active FIXSessionPersistences (only in case that the session is a 24 hour session; a new active persistence may be created every day).
isActive()public boolean isActive()
A FIXSession may have at most one currently active FIXSessionPersistence (see isCurrentActive()), while a FIXSession may have more than one Active FIXSessionPersistences (only in case that the session is a 24 hour session; a new active persistence may be created every day).
isCurrentActive()public DateTime getStartTimeUtc()
public int getGlobalPersistenceID()
FIXEngine.getGlobalSessionPersistences().
The GlobalPersistenceID is an ID assigned internally by the system. The runtime maintains a list of all FIXSessionPersistence in the system. The GlobalPersistenceID is a 0 based index of the current FIXSessionPersistence in the list.
Normally this value should be the same as getEnginePersistenceID(), unless there are more than 1 FIXEngine in the process.
getEnginePersistenceID()public int getEnginePersistenceID()
FIXEngine.getSessionPersistences().
getGlobalPersistenceID()public int getSessionPersistenceID()
FIXSession.getPersistences().
public int getNextOutgoingAppQueueSeq()
The sequence number is the internal sequence number used to identify the application messages sent by calling sendMessage().
The internal sequence of an outgoing message may be different than the "real" MsgSeqNum in the FIX message received by the receipient.
public int getNextOutgoingAdminQueueSeq()
The sequence number is the internal sequence number used to identify the administrative messages sent to the recipient.
The internal sequence of an outgoing message may be different than the "real" MsgSeqNum in the FIX message received by the recipient.
public int getNextSendingSeq()
public int getExpectedIncomingSeq()
throws IOException
IOException - Signals that an I/O exception has occurred.public int getMaximumIncomingSeq()
This number may be different than getExpectedIncomingSeq() because the session may be in resend process due to early unexpected network outrage.
public FIXMessage getReceivedMessage(int msgSeqNum)
The method may return null if the message received did not pass validation (in that case the message can not be properly constructed) or the message is a lost administrative message and was "gap filled" during reconnection recovery process.
This method will automatically put the message to the top if the internal LRU message cache.
msgSeqNum - MsgSeqNum of the incoming message
public FIXMessage getOutgoingAppMessage(int internalSeq)
This method gets the application message in the outgoing queue. Note the message is enqueued during call to SendMessage()()(). Depends on the system load and network conditions, the message may have not yet been "actually" sent over the wire. So the message may noy have a "real" MsgSeqNum yet. That's why we use a "internal sequence number" as parameter.
The internalSeq should have a value between 1 and getNextOutgoingAppQueueSeq().
The value of MsgSeqNum field in the FIXMessage instance is the internal sequence number, not the same sequence the receipient seen in the message received. In order to get the real MsgSeqNum, call getSentMessage(int) method.
This method will automatically put the message to the top if the internal LRU message cache.
internalSeq - the internal sequence number
public FIXMessage getOutgoingAdminMessage(int internalSeq)
The internalSeq is used to internally identify the administrative messages sent to the recipient, which may be different than the "real" MsgSeqNum in the FIX message received by the recipient.
The internalSeq should have a value between 1 and getNextOutgoingAdminQueueSeq().
The value of MsgSeqNum field in the FIXMessage instance is the internal sequence number, not the same sequence the recipient seen in the message received. In order to get the real MsgSeqNum, call getSentMessage(int) method.
This method will automatically put the message to the top if the internal LRU message cache.
internalSeq - internal sequence number
public FIXMessage getSentMessage(int msgSeqNum)
msgSeqNum - actual MsgSeqNum
|
||||||||||
| PREV CLASS NEXT CLASS | All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||