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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAbstractVersionedInputStream(VersionedMetadata versionedMetadata, Runnable afterClose) -
Method Summary
Methods inherited from class java.io.InputStream
available, mark, markSupported, nullInputStream, read, read, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Field Details
-
versionedMetadata
-
afterClose
-
-
Constructor Details
-
AbstractVersionedInputStream
-
-
Method Details
-
getVersion
public long getVersion()- Specified by:
getVersionin interfaceVersioned
-
getCreated
public long getCreated()- Specified by:
getCreatedin interfaceMetadata- Returns:
- Time when entry was created. -1 for immortal entries.
-
getLifespan
public int getLifespan()- Specified by:
getLifespanin interfaceMetadata- Returns:
- Lifespan of the entry in seconds. Negative values are interpreted as unlimited lifespan.
-
getLastUsed
public long getLastUsed()- Specified by:
getLastUsedin interfaceMetadata- Returns:
- Time when entry was last used. -1 for immortal entries.
-
getMaxIdle
public int getMaxIdle()- Specified by:
getMaxIdlein interfaceMetadata- Returns:
- The maximum amount of time (in seconds) this key is allowed to be idle for before it is considered as expired.
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-