Package org.infinispan.api.sync
Interface SyncStreamingCache<K>
public interface SyncStreamingCache<K>
SyncStreamingCache implements streaming versions of most
SyncCache
methods- Since:
- 14.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault <T extends InputStream & CacheEntryMetadata>
TRetrieves the value of the specified key as anInputStream
.<T extends InputStream & CacheEntryMetadata>
Tget
(K key, CacheOptions options) Retrieves the value of the specified key as anInputStream
.default OutputStream
Initiates a streaming put operation.put
(K key, CacheOptions options) default 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.putIfAbsent
(K key, CacheWriteOptions options)
-
Method Details
-
get
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 theCacheEntryMetadata
interface. The returned input stream is not thread-safe.- Parameters:
key
- key to use
-
get
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 theCacheEntryMetadata
interface. The returned input stream is not thread-safe.- Parameters:
key
- key to use
-
put
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
- Parameters:
key
-options
-- Returns:
-
putIfAbsent
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
- Parameters:
key
-options
-- Returns:
-