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
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceUsed to signal a Delete operationstatic interfaceUsed to signal a Put operationstatic interfaceA SequenceId uniquely identifies a stream operation associated with a Publisher.static enumThe type of the operation. -
Method Summary
Modifier and TypeMethodDescriptionasDelete()Converts this operation to aStreamOperation.DeleteEvent.asPut()Converts this operation to aStreamOperation.PutEvent.intReturns 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
-