Interface FixSessionStore
- All Known Implementing Classes:
FileSessionStore,FixSessionStore.InMemory
public interface FixSessionStore
Persistence seam for a
FixSession: sequence numbers and the
outbound application-message store. With a durable implementation
(FileSessionStore) a session reconnects with sequence-number
continuation — the peer's ResendRequest is then serviced from messages
sent before the restart, which is what production counterparties expect.
Methods are invoked from the session's writer path (outgoing) and reader thread (incoming); implementations must be thread-safe.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classstatic final recordOne stored outbound application message, replayable on ResendRequest. -
Method Summary
Modifier and TypeMethodDescriptionlongThe next incoming MsgSeqNum expected (1 for a fresh session).static FixSessionStoreinMemory()Fresh in-memory store: per-connection sequence numbers (the default).longThe next outgoing MsgSeqNum to use (1 for a fresh session).retrieve(long seq) The stored message atseq, or null (admin / never sent).voidsaveIncomingSeq(long expectedSeq) voidsaveOutgoingSeq(long nextSeq) voidstoreMessage(long seq, FixSessionStore.StoredMessage message)
-
Method Details
-
nextOutgoingSeq
long nextOutgoingSeq()The next outgoing MsgSeqNum to use (1 for a fresh session). -
expectedIncomingSeq
long expectedIncomingSeq()The next incoming MsgSeqNum expected (1 for a fresh session). -
saveOutgoingSeq
void saveOutgoingSeq(long nextSeq) -
saveIncomingSeq
void saveIncomingSeq(long expectedSeq) -
storeMessage
-
retrieve
The stored message atseq, or null (admin / never sent). -
inMemory
Fresh in-memory store: per-connection sequence numbers (the default).
-