Class PersistenceImpl.LegacyStreams<UpdateType>

java.lang.Object
io.deephaven.persistence.PersistenceImpl.LegacyStreams<UpdateType>
All Implemented Interfaces:
Persistence.PersistenceStream<UpdateType,com.fishlib.dataobjects.persistence.PersistentInputStream,com.fishlib.dataobjects.persistence.PersistentOutputStream>
Enclosing class:
PersistenceImpl<U>

public static class PersistenceImpl.LegacyStreams<UpdateType> extends Object implements Persistence.PersistenceStream<UpdateType,com.fishlib.dataobjects.persistence.PersistentInputStream,com.fishlib.dataobjects.persistence.PersistentOutputStream>
This is the peristence streams manager used for PHTs and other persistent caches.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    closeCheckpointOutputStream(com.fishlib.dataobjects.persistence.PersistentOutputStream out, int lastCommandId)
    Close a checkpoint output stream.
    void
    closeUpdateOutputStream(com.fishlib.dataobjects.persistence.PersistentOutputStream out)
    Close an update output stream.
    com.fishlib.dataobjects.persistence.PersistentInputStream
    newCheckpointInputStream(String path, int bufferSizeHint)
    Return a new input stream for a checkpoint file.
    com.fishlib.dataobjects.persistence.PersistentOutputStream
    newCheckpointOutputStream(String path, int bufferSizeHint)
    Return a new output stream for a checkpoint file.
    com.fishlib.dataobjects.persistence.PersistentInputStream
    Return a new input stream for an update file.
    com.fishlib.dataobjects.persistence.PersistentOutputStream
    Return a new output stream for an update file.
    readObject(com.fishlib.dataobjects.persistence.PersistentInputStream in)
    Read the next persisted Object from disk.
    void
    writeObject(com.fishlib.dataobjects.persistence.PersistentOutputStream out, UpdateType update)
    Write an update to an output stream.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • newCheckpointInputStream

      public com.fishlib.dataobjects.persistence.PersistentInputStream newCheckpointInputStream(String path, int bufferSizeHint) throws IOException, ClassNotFoundException
      Description copied from interface: Persistence.PersistenceStream
      Return a new input stream for a checkpoint file.
      Specified by:
      newCheckpointInputStream in interface Persistence.PersistenceStream<UpdateType,com.fishlib.dataobjects.persistence.PersistentInputStream,com.fishlib.dataobjects.persistence.PersistentOutputStream>
      Parameters:
      path - the full path and filename for the checkpoint file
      bufferSizeHint - a suggestion for the buffer size
      Returns:
      the input stream
      Throws:
      IOException - from the implementation
      ClassNotFoundException - from the implementation
    • newCheckpointOutputStream

      public com.fishlib.dataobjects.persistence.PersistentOutputStream newCheckpointOutputStream(String path, int bufferSizeHint) throws IOException
      Description copied from interface: Persistence.PersistenceStream
      Return a new output stream for a checkpoint file.
      Specified by:
      newCheckpointOutputStream in interface Persistence.PersistenceStream<UpdateType,com.fishlib.dataobjects.persistence.PersistentInputStream,com.fishlib.dataobjects.persistence.PersistentOutputStream>
      Parameters:
      path - the full path and filename for the checkpoint file
      bufferSizeHint - a suggestion for the buffer size
      Returns:
      the output stream
      Throws:
      IOException - from the implementation
    • closeCheckpointOutputStream

      public void closeCheckpointOutputStream(com.fishlib.dataobjects.persistence.PersistentOutputStream out, int lastCommandId) throws IOException
      Description copied from interface: Persistence.PersistenceStream
      Close a checkpoint output stream.
      Specified by:
      closeCheckpointOutputStream in interface Persistence.PersistenceStream<UpdateType,com.fishlib.dataobjects.persistence.PersistentInputStream,com.fishlib.dataobjects.persistence.PersistentOutputStream>
      Parameters:
      out - the output stream
      lastCommandId - the command ID for this checkpoint
      Throws:
      IOException - from the implementation
    • newUpdateInputStream

      public com.fishlib.dataobjects.persistence.PersistentInputStream newUpdateInputStream(String path) throws IOException, ClassNotFoundException
      Description copied from interface: Persistence.PersistenceStream
      Return a new input stream for an update file.
      Specified by:
      newUpdateInputStream in interface Persistence.PersistenceStream<UpdateType,com.fishlib.dataobjects.persistence.PersistentInputStream,com.fishlib.dataobjects.persistence.PersistentOutputStream>
      Parameters:
      path - the full path and filename for the update file
      Returns:
      the input stream
      Throws:
      IOException - from the implementation
      ClassNotFoundException - from the implementation
    • newUpdateOutputStream

      public com.fishlib.dataobjects.persistence.PersistentOutputStream newUpdateOutputStream(String path) throws IOException
      Description copied from interface: Persistence.PersistenceStream
      Return a new output stream for an update file.
      Specified by:
      newUpdateOutputStream in interface Persistence.PersistenceStream<UpdateType,com.fishlib.dataobjects.persistence.PersistentInputStream,com.fishlib.dataobjects.persistence.PersistentOutputStream>
      Parameters:
      path - the full path and filename for the checkpoint file
      Returns:
      the output stream
      Throws:
      IOException - from the implementation
    • closeUpdateOutputStream

      public void closeUpdateOutputStream(com.fishlib.dataobjects.persistence.PersistentOutputStream out) throws IOException
      Description copied from interface: Persistence.PersistenceStream
      Close an update output stream.
      Specified by:
      closeUpdateOutputStream in interface Persistence.PersistenceStream<UpdateType,com.fishlib.dataobjects.persistence.PersistentInputStream,com.fishlib.dataobjects.persistence.PersistentOutputStream>
      Parameters:
      out - the output stream
      Throws:
      IOException - from the implementation
    • readObject

      public Object readObject(com.fishlib.dataobjects.persistence.PersistentInputStream in) throws IOException, ClassNotFoundException
      Description copied from interface: Persistence.PersistenceStream
      Read the next persisted Object from disk. Return null if the stream is at end of file. The returned object need be immutable only if the semantics of the associated Callbacks.handlePersistenceInitializationUpdate() require it to be so. The Persistence instance itself only relies on the returned object remaining unchanged until it has been passed to handlePersistenceInitializationUpdate().
      Specified by:
      readObject in interface Persistence.PersistenceStream<UpdateType,com.fishlib.dataobjects.persistence.PersistentInputStream,com.fishlib.dataobjects.persistence.PersistentOutputStream>
      Parameters:
      in - the input stream
      Returns:
      the next persisted Object, or null if end-of-file
      Throws:
      IOException - from the implementation
      ClassNotFoundException - from the implementation
    • writeObject

      public void writeObject(com.fishlib.dataobjects.persistence.PersistentOutputStream out, UpdateType update) throws IOException
      Description copied from interface: Persistence.PersistenceStream
      Write an update to an output stream.
      Specified by:
      writeObject in interface Persistence.PersistenceStream<UpdateType,com.fishlib.dataobjects.persistence.PersistentInputStream,com.fishlib.dataobjects.persistence.PersistentOutputStream>
      Parameters:
      out - the output stream
      update - the update object to be written
      Throws:
      IOException - from the implementation