Class AbstractVersionedInputStream

java.lang.Object
java.io.InputStream
org.infinispan.hotrod.impl.protocol.AbstractVersionedInputStream
All Implemented Interfaces:
Closeable, AutoCloseable, Metadata, Versioned, VersionedMetadata
Direct Known Subclasses:
ChannelInputStream

@NotThreadSafe public abstract class AbstractVersionedInputStream extends InputStream implements VersionedMetadata
  • Field Details

  • Constructor Details

    • AbstractVersionedInputStream

      public AbstractVersionedInputStream(VersionedMetadata versionedMetadata, Runnable afterClose)
  • Method Details

    • getVersion

      public long getVersion()
      Specified by:
      getVersion in interface Versioned
    • getCreated

      public long getCreated()
      Specified by:
      getCreated in interface Metadata
      Returns:
      Time when entry was created. -1 for immortal entries.
    • getLifespan

      public int getLifespan()
      Specified by:
      getLifespan in interface Metadata
      Returns:
      Lifespan of the entry in seconds. Negative values are interpreted as unlimited lifespan.
    • getLastUsed

      public long getLastUsed()
      Specified by:
      getLastUsed in interface Metadata
      Returns:
      Time when entry was last used. -1 for immortal entries.
    • getMaxIdle

      public int getMaxIdle()
      Specified by:
      getMaxIdle in interface Metadata
      Returns:
      The maximum amount of time (in seconds) this key is allowed to be idle for before it is considered as expired.
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class InputStream
      Throws:
      IOException