public interface StreamingRemoteCache<K>
RemoteCache
methodsModifier and Type | Method and Description |
---|---|
<T extends InputStream & VersionedMetadata> |
get(K key)
Retrieves the value of the specified key as an
InputStream . |
OutputStream |
put(K key)
Initiates a streaming put operation.
|
OutputStream |
put(K key,
long lifespan,
TimeUnit lifespanUnit)
An overloaded form of
put(Object) , which takes in lifespan parameters. |
OutputStream |
put(K key,
long lifespan,
TimeUnit lifespanUnit,
long maxIdle,
TimeUnit maxIdleUnit)
An overloaded form of
put(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 of
putIfAbsent(Object) which takes in lifespan parameters. |
OutputStream |
putIfAbsent(K key,
long lifespan,
TimeUnit lifespanUnit,
long maxIdle,
TimeUnit maxIdleUnit)
An overloaded form of
putIfAbsent(Object) which takes in lifespan and maxIdle parameters. |
OutputStream |
replaceWithVersion(K key,
long version)
A form of
put(Object) , which takes in a version. |
OutputStream |
replaceWithVersion(K key,
long version,
long lifespan,
TimeUnit lifespanUnit)
An overloaded form of
replaceWithVersion(Object, long) which takes in lifespan parameters. |
OutputStream |
replaceWithVersion(K key,
long version,
long lifespan,
TimeUnit lifespanUnit,
long maxIdle,
TimeUnit maxIdleUnit)
An overloaded form of
replaceWithVersion(Object, long) which takes in lifespan and maxIdle parameters. |
<T extends 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 useOutputStream 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 useOutputStream put(K key, long lifespan, 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 lifespanOutputStream put(K key, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
put(Object)
, which takes in lifespan and maxIdle parameters.
The returned output stream is not thread-safe.OutputStream putIfAbsent(K key)
key
- key to useOutputStream putIfAbsent(K key, long lifespan, 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 lifespanOutputStream putIfAbsent(K key, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
putIfAbsent(Object)
which takes in lifespan and maxIdle parameters.
The returned output stream is not thread-safe.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 forOutputStream replaceWithVersion(K key, long version, long lifespan, 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 lifespanOutputStream replaceWithVersion(K key, long version, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
replaceWithVersion(Object, long)
which takes in lifespan and maxIdle parameters.
The returned output stream is not thread-safe.Copyright © 2021 JBoss by Red Hat. All rights reserved.