Package oracle.kv.pubsub
Interface StreamOperation
- All Known Subinterfaces:
StreamOperation.DeleteEvent
,StreamOperation.PutEvent
public interface StreamOperation
The operation (Put, Delete) that was delivered over the NoSQL stream.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Used to signal a Delete operationstatic interface
Used to signal a Put operationstatic interface
A SequenceId uniquely identifies a stream operation associated with a Publisher.static enum
The type of the operation. -
Method Summary
Modifier and TypeMethodDescriptionasDelete()
Converts this operation to aStreamOperation.DeleteEvent
.asPut()
Converts this operation to aStreamOperation.PutEvent
.int
Returns the shard id associated with this operation.Returns the unique sequence id associated with this operation.getType()
Returns the type of this operation.
-
Method Details
-
getSequenceId
StreamOperation.SequenceId getSequenceId()Returns the unique sequence id associated with this operation. -
getRepGroupId
int getRepGroupId()Returns the shard id associated with this operation. -
getType
StreamOperation.Type getType()Returns the type of this operation.- Returns:
- the type of this operation
-
asPut
StreamOperation.PutEvent asPut()Converts this operation to aStreamOperation.PutEvent
.- Returns:
- this operation as a Put
- Throws:
IllegalArgumentException
- if this operation is not a Put
-
asDelete
StreamOperation.DeleteEvent asDelete()Converts this operation to aStreamOperation.DeleteEvent
.- Returns:
- this operation as a Delete
- Throws:
IllegalArgumentException
- if this operation is not a Delete
-