Package com.tangosol.net.cache
Interface StoreObserver<K,V>
- All Known Implementing Classes:
ReadWriteBackingMap.NonBlockingEntryStoreWrapper.LoadOperationObserver
,ReadWriteBackingMap.NonBlockingEntryStoreWrapper.StoreOperationObserver
public interface StoreObserver<K,V>
StoreObserver implementations provide a means for receivers, such as
NonBlockingEntryStore
, to notify the provider of successful
completion (onNext(com.tangosol.util.BinaryEntry<K, V>)
) or unsuccessful
completion (onError(com.tangosol.util.BinaryEntry<K, V>, java.lang.Exception)
).
A call to onComplete()
indicates that the receiver will no longer call
onNext(com.tangosol.util.BinaryEntry<K, V>)
or onError(com.tangosol.util.BinaryEntry<K, V>, java.lang.Exception)
on this instance.
Note: onComplete()
is inferred if onNext or onError is called on all
entries received, however it provides a means for receivers to suggest
termination of the operation and thus to notify any waiting resources
or completion routines of the operation's completion.
- Since:
- 21.06
- Author:
- mg/hr/as
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Complete the current operation.void
onError
(BinaryEntry<K, V> binEntry, Exception exception) Indicate that the corresponding entry is in error, due to the given exception.void
onNext
(BinaryEntry<K, V> binEntry) Indicates the associated operation (load or store) has completed successfully and applied to the provided BinaryEntry.
-
Method Details
-
onNext
Indicates the associated operation (load or store) has completed successfully and applied to the provided BinaryEntry.- Parameters:
binEntry
- the associated entry- Throws:
IllegalStateException
- if called after the observer is closed oronComplete()
has been called.
-
onError
Indicate that the corresponding entry is in error, due to the given exception.- Parameters:
binEntry
- the associated entryexception
- exception providing error details- Throws:
IllegalStateException
- if called after the observer is closed oronComplete()
has been called.
-
onComplete
void onComplete()Complete the current operation. This is the last call to make on an observer, to signify that no further processing is necessary.
-