quickfix
Class FileStore

java.lang.Object
  extended by quickfix.FileStore
All Implemented Interfaces:
MessageStore

public class FileStore
extends java.lang.Object
implements MessageStore

File store implementation. THIS CLASS IS PUBLIC ONLY TO MAINTAIN COMPATIBILITY WITH THE QUICKFIX JNI. IT SHOULD ONLY BE CREATED USING A FACTORY.

See Also:
FileStoreFactory

Method Summary
 void closeFiles()
          Close the store's files.
 void deleteFiles()
           
 void get(int startSequence, int endSequence, java.util.Collection<java.lang.String> messages)
          Get messages within sequence number range (inclusive).
 boolean get(int sequence, java.lang.String message)
          This method is here for JNI API consistency but it's not implemented.
 java.util.Date getCreationTime()
          Get the session creation time.
 int getNextSenderMsgSeqNum()
           
 int getNextTargetMsgSeqNum()
           
 void incrNextSenderMsgSeqNum()
           
 void incrNextTargetMsgSeqNum()
           
 void refresh()
          Refresh session state from a shared state storage (e.g. database, file, ...).
 void reset()
          Reset the message store.
 boolean set(int sequence, java.lang.String message)
          Adds a raw fix messages to the store with the given sequence number.
 void setNextSenderMsgSeqNum(int next)
           
 void setNextTargetMsgSeqNum(int next)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getCreationTime

public java.util.Date getCreationTime()
                               throws java.io.IOException
Description copied from interface: MessageStore
Get the session creation time.

Specified by:
getCreationTime in interface MessageStore
Returns:
the session creation time.
Throws:
java.io.IOException - IO error

closeFiles

public void closeFiles()
                throws java.io.IOException
Close the store's files.

Throws:
java.io.IOException

deleteFiles

public void deleteFiles()
                 throws java.io.IOException
Throws:
java.io.IOException

getNextSenderMsgSeqNum

public int getNextSenderMsgSeqNum()
                           throws java.io.IOException
Specified by:
getNextSenderMsgSeqNum in interface MessageStore
Throws:
java.io.IOException

getNextTargetMsgSeqNum

public int getNextTargetMsgSeqNum()
                           throws java.io.IOException
Specified by:
getNextTargetMsgSeqNum in interface MessageStore
Throws:
java.io.IOException

setNextSenderMsgSeqNum

public void setNextSenderMsgSeqNum(int next)
                            throws java.io.IOException
Specified by:
setNextSenderMsgSeqNum in interface MessageStore
Throws:
java.io.IOException

setNextTargetMsgSeqNum

public void setNextTargetMsgSeqNum(int next)
                            throws java.io.IOException
Specified by:
setNextTargetMsgSeqNum in interface MessageStore
Throws:
java.io.IOException

incrNextSenderMsgSeqNum

public void incrNextSenderMsgSeqNum()
                             throws java.io.IOException
Specified by:
incrNextSenderMsgSeqNum in interface MessageStore
Throws:
java.io.IOException

incrNextTargetMsgSeqNum

public void incrNextTargetMsgSeqNum()
                             throws java.io.IOException
Specified by:
incrNextTargetMsgSeqNum in interface MessageStore
Throws:
java.io.IOException

get

public void get(int startSequence,
                int endSequence,
                java.util.Collection<java.lang.String> messages)
         throws java.io.IOException
Description copied from interface: MessageStore
Get messages within sequence number range (inclusive). Used for message resend requests.

Specified by:
get in interface MessageStore
Parameters:
startSequence - the starting message sequence number.
endSequence - the ending message sequence number.
messages - the retrieved messages (out parameter)
Throws:
java.io.IOException - IO error

get

public boolean get(int sequence,
                   java.lang.String message)
            throws java.io.IOException
This method is here for JNI API consistency but it's not implemented. Use get(int, int, Collection) with the same start and end sequence.

Throws:
java.io.IOException

set

public boolean set(int sequence,
                   java.lang.String message)
            throws java.io.IOException
Description copied from interface: MessageStore
Adds a raw fix messages to the store with the given sequence number. (Most implementations just append the message data to the store so be careful about assuming random access behavior.)

Specified by:
set in interface MessageStore
Parameters:
sequence - the sequence number
message - the raw FIX message string
Returns:
true is successful, false otherwise
Throws:
java.io.IOException - IO error

refresh

public void refresh()
             throws java.io.IOException
Description copied from interface: MessageStore
Refresh session state from a shared state storage (e.g. database, file, ...). Refresh will not work for message stores without shared state (e.g., MemoryStore). These stores should log an session error, at a minimum, or throw an exception.

Specified by:
refresh in interface MessageStore
Throws:
java.io.IOException

reset

public void reset()
           throws java.io.IOException
Description copied from interface: MessageStore
Reset the message store. Sequence numbers are set back to 1 and stored messages are erased. The session creation time is also set to the time of the reset.

Specified by:
reset in interface MessageStore
Throws:
java.io.IOException - IO error