Package org.infinispan.client.hotrod
Interface StreamingRemoteCache<K>
-
public interface StreamingRemoteCache<K>
StreamingRemoteCache implements streaming versions of mostRemoteCache
methods- Since:
- 9.0
- Author:
- Tristan Tarrant
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T extends InputStream & VersionedMetadata>
Tget(K key)
Retrieves the value of the specified key as anInputStream
.OutputStream
put(K key)
Initiates a streaming put operation.OutputStream
put(K key, long lifespan, TimeUnit lifespanUnit)
An overloaded form ofput(Object)
, which takes in lifespan parameters.OutputStream
put(K key, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
An overloaded form ofput(Object)
, which takes in lifespan and maxIdle parameters.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.OutputStream
putIfAbsent(K key, long lifespan, TimeUnit lifespanUnit)
An overloaded form ofputIfAbsent(Object)
which takes in lifespan parameters.OutputStream
putIfAbsent(K key, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
An overloaded form ofputIfAbsent(Object)
which takes in lifespan and maxIdle parameters.OutputStream
replaceWithVersion(K key, long version)
A form ofput(Object)
, which takes in a version.OutputStream
replaceWithVersion(K key, long version, long lifespan, TimeUnit lifespanUnit)
An overloaded form ofreplaceWithVersion(Object, long)
which takes in lifespan parameters.OutputStream
replaceWithVersion(K key, long version, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
An overloaded form ofreplaceWithVersion(Object, long)
which takes in lifespan and maxIdle parameters.
-
-
-
Method Detail
-
get
<T extends InputStream & VersionedMetadata> T get(K key)
Retrieves the value of the specified key as anInputStream
. 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 theVersionedMetadata
interface. The returned input stream is not thread-safe.- Parameters:
key
- key to use
-
put
OutputStream put(K key)
Initiates a streaming put operation. It is up to the application to write to the returnedOutputStream
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.- Parameters:
key
- key to use
-
put
OutputStream put(K key, long lifespan, TimeUnit lifespanUnit)
An overloaded form ofput(Object)
, which takes in lifespan parameters. The returned output stream is not thread-safe.- Parameters:
key
- key to uselifespan
- lifespan of the entry. Negative values are interpreted as unlimited lifespan.lifespanUnit
- unit of measurement for the lifespan
-
put
OutputStream put(K key, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
An overloaded form ofput(Object)
, which takes in lifespan and maxIdle parameters. The returned output stream is not thread-safe.
-
putIfAbsent
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. The operation is atomic. The server only performs the operation once the stream has been closed. The returned output stream is not thread-safe.- Parameters:
key
- key to use
-
putIfAbsent
OutputStream putIfAbsent(K key, long lifespan, TimeUnit lifespanUnit)
An overloaded form ofputIfAbsent(Object)
which takes in lifespan parameters. The returned output stream is not thread-safe.- Parameters:
key
- key to uselifespan
- lifespan of the entrylifespanUnit
-TimeUnit
for lifespan
-
putIfAbsent
OutputStream putIfAbsent(K key, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
An overloaded form ofputIfAbsent(Object)
which takes in lifespan and maxIdle parameters. The returned output stream is not thread-safe.
-
replaceWithVersion
OutputStream replaceWithVersion(K key, long version)
A form ofput(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.- Parameters:
key
- key to useversion
- the version to check for
-
replaceWithVersion
OutputStream replaceWithVersion(K key, long version, long lifespan, TimeUnit lifespanUnit)
An overloaded form ofreplaceWithVersion(Object, long)
which takes in lifespan parameters. The returned output stream is not thread-safe.- Parameters:
key
- key to useversion
- the version to check forlifespan
- lifespan of the entrylifespanUnit
-TimeUnit
for lifespan
-
replaceWithVersion
OutputStream replaceWithVersion(K key, long version, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
An overloaded form ofreplaceWithVersion(Object, long)
which takes in lifespan and maxIdle parameters. The returned output stream is not thread-safe.
-
-