public interface StreamingRemoteCache<K>
RemoteCache methods| Modifier and Type | Method and Description |
|---|---|
<T extends java.io.InputStream & VersionedMetadata> |
get(K key)
Retrieves the value of the specified key as an
InputStream. |
java.io.OutputStream |
put(K key)
Initiates a streaming put operation.
|
java.io.OutputStream |
put(K key,
long lifespan,
java.util.concurrent.TimeUnit lifespanUnit)
An overloaded form of
put(Object), which takes in lifespan parameters. |
java.io.OutputStream |
put(K key,
long lifespan,
java.util.concurrent.TimeUnit lifespanUnit,
long maxIdle,
java.util.concurrent.TimeUnit maxIdleUnit)
An overloaded form of
put(Object), which takes in lifespan and maxIdle parameters. |
java.io.OutputStream |
putIfAbsent(K key)
A conditional form of put which inserts an entry into the cache only if no mapping for the key is already present.
|
java.io.OutputStream |
putIfAbsent(K key,
long lifespan,
java.util.concurrent.TimeUnit lifespanUnit)
An overloaded form of
putIfAbsent(Object) which takes in lifespan parameters. |
java.io.OutputStream |
putIfAbsent(K key,
long lifespan,
java.util.concurrent.TimeUnit lifespanUnit,
long maxIdle,
java.util.concurrent.TimeUnit maxIdleUnit)
An overloaded form of
putIfAbsent(Object) which takes in lifespan and maxIdle parameters. |
java.io.OutputStream |
replaceWithVersion(K key,
long version)
A form of
put(Object), which takes in a version. |
java.io.OutputStream |
replaceWithVersion(K key,
long version,
long lifespan,
java.util.concurrent.TimeUnit lifespanUnit)
An overloaded form of
replaceWithVersion(Object, long) which takes in lifespan parameters. |
java.io.OutputStream |
replaceWithVersion(K key,
long version,
long lifespan,
java.util.concurrent.TimeUnit lifespanUnit,
long maxIdle,
java.util.concurrent.TimeUnit maxIdleUnit)
An overloaded form of
replaceWithVersion(Object, long) which takes in lifespan and maxIdle parameters. |
<T extends java.io.InputStream & VersionedMetadata> T get(K key)
InputStream. It is up to the application to ensure
that the stream is consumed and closed. The marshaller is ignored, i.e. all data will be read in its
raw binary form. The returned input stream implements the VersionedMetadata interface.
The returned input stream is not thread-safe.key - key to usejava.io.OutputStream put(K key)
OutputStream
and close it when there is no more data to write. The marshaller is ignored, i.e. all data will be written in its
raw binary form. The returned output stream is not thread-safe.key - key to usejava.io.OutputStream put(K key, long lifespan, java.util.concurrent.TimeUnit lifespanUnit)
put(Object), which takes in lifespan parameters.
The returned output stream is not thread-safe.key - key to uselifespan - lifespan of the entry. Negative values are interpreted as unlimited lifespan.lifespanUnit - unit of measurement for the lifespanjava.io.OutputStream put(K key, long lifespan, java.util.concurrent.TimeUnit lifespanUnit, long maxIdle, java.util.concurrent.TimeUnit maxIdleUnit)
put(Object), which takes in lifespan and maxIdle parameters.
The returned output stream is not thread-safe.key - key to uselifespan - lifespan of the entrylifespanUnit - TimeUnit for lifespanmaxIdle - the maximum amount of time this key is allowed
to be idle for before it is considered as expiredmaxIdleUnit - TimeUnit for maxIdlejava.io.OutputStream putIfAbsent(K key)
key - key to usejava.io.OutputStream putIfAbsent(K key, long lifespan, java.util.concurrent.TimeUnit lifespanUnit)
putIfAbsent(Object) which takes in lifespan parameters.
The returned output stream is not thread-safe.key - key to uselifespan - lifespan of the entrylifespanUnit - TimeUnit for lifespanjava.io.OutputStream putIfAbsent(K key, long lifespan, java.util.concurrent.TimeUnit lifespanUnit, long maxIdle, java.util.concurrent.TimeUnit maxIdleUnit)
putIfAbsent(Object) which takes in lifespan and maxIdle parameters.
The returned output stream is not thread-safe.key - key to uselifespan - lifespan of the entrylifespanUnit - TimeUnit for lifespanmaxIdle - the maximum amount of time this key is allowed
to be idle for before it is considered as expiredmaxIdleUnit - TimeUnit for maxIdlejava.io.OutputStream replaceWithVersion(K key, long version)
put(Object), which takes in a version. The value will be replaced on the server only if
the existing entry's version matches. The returned output stream is not thread-safe.key - key to useversion - the version to check forjava.io.OutputStream replaceWithVersion(K key, long version, long lifespan, java.util.concurrent.TimeUnit lifespanUnit)
replaceWithVersion(Object, long) which takes in lifespan parameters.
The returned output stream is not thread-safe.key - key to useversion - the version to check forlifespan - lifespan of the entrylifespanUnit - TimeUnit for lifespanjava.io.OutputStream replaceWithVersion(K key, long version, long lifespan, java.util.concurrent.TimeUnit lifespanUnit, long maxIdle, java.util.concurrent.TimeUnit maxIdleUnit)
replaceWithVersion(Object, long) which takes in lifespan and maxIdle parameters.
The returned output stream is not thread-safe.key - key to useversion - the version to check forlifespan - lifespan of the entrylifespanUnit - TimeUnit for lifespanmaxIdle - the maximum amount of time this key is allowed
to be idle for before it is considered as expiredmaxIdleUnit - TimeUnit for maxIdle