public interface CacheStoreSession
properties()
map.
You can then commit this connection in the CacheStore.sessionEnd(boolean)
method.
CacheStoreSession
can be injected into an implementation of CacheStore
with
@CacheStoreSessionResource
annotation.
CacheStoreSessionResource
Modifier and Type | Method and Description |
---|---|
<T> T |
attach(@Nullable Object attachment)
Attaches the given object to this session.
|
<T> T |
attachment()
Retrieves the current attachment or
null if there is no attachment. |
String |
cacheName()
Cache name for the current store operation.
|
boolean |
isWithinTransaction()
Returns
true if performing store operation within a transaction,
false otherwise. |
<K,V> Map<K,V> |
properties()
Gets current session properties.
|
Transaction |
transaction()
Gets transaction spanning multiple store operations, or
null if
there is no transaction. |
Transaction transaction()
null
if
there is no transaction.boolean isWithinTransaction()
true
if performing store operation within a transaction,
false
otherwise. Analogous to calling transaction() != null
.True
if performing store operation within a transaction,
false
otherwise.@Nullable <T> T attach(@Nullable @Nullable Object attachment)
An attached object may later be retrieved via the attachment()
method. Invoking this method causes any previous attachment to be
discarded. To attach additional objects use properties()
map.
The current attachment may be discarded by attaching null
.
T
- Type of the previously attached object.attachment
- The object to be attached (or null
to discard current attachment).@Nullable <T> T attachment()
null
if there is no attachment.T
- Type of the attached object.<K,V> Map<K,V> properties()
K
- Type of keys in the properties map.V
- Type of mapped values in the properties map.String cacheName()
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.16.0 Release Date : December 15 2023