Class StreamingImpl
java.lang.Object
com.oracle.cloud.spring.streaming.StreamingImpl
- All Implemented Interfaces:
Streaming
Implementation of the OCI streaming module.
-
Constructor Summary
ConstructorsConstructorDescriptionStreamingImpl(com.oracle.bmc.streaming.Stream stream, com.oracle.bmc.streaming.StreamAdmin streamAdmin) -
Method Summary
Modifier and TypeMethodDescriptioncom.oracle.bmc.streaming.responses.CreateCursorResponsecreateCursor(String streamId, Long offset, Date time, com.oracle.bmc.streaming.model.CreateCursorDetails.Type type, String partition) Creates a cursor point from where Content of the stream message to be retrievedcom.oracle.bmc.streaming.responses.CreateGroupCursorResponsecreateGroupCursor(String streamId, String groupName, Date time, com.oracle.bmc.streaming.model.CreateGroupCursorDetails.Type type, Boolean commitOnGet, String instanceName, Integer timeoutInMs) Creates a group-cursor point from where Content of the stream message to be retrievedcom.oracle.bmc.streaming.responses.CreateStreamResponsecreateStream(String name, String streamPoolId, Integer partitions, Integer retentionInHours) creates stream resource in OCIcom.oracle.bmc.streaming.responses.CreateStreamPoolResponsecreateStreamPool(String name, String compartmentId) creates stream pool resource in OCIcom.oracle.bmc.streaming.responses.DeleteStreamResponsedeleteStream(String streamId) deletes stream resource from OCIcom.oracle.bmc.streaming.responses.DeleteStreamPoolResponsedeleteStreamPool(String streamPoolId) deletes stream pool resource from OCIcom.oracle.bmc.streaming.StreamAdminDirect instance of OCI Java SDK streaming Admin Client.com.oracle.bmc.streaming.StreamDirect instance of OCI Java SDK streaming Client.com.oracle.bmc.streaming.responses.GetMessagesResponsegetMessages(String streamId, String cursor) Retrieves stream message associated with a Stream OCIDcom.oracle.bmc.streaming.responses.PutMessagesResponseputMessages(String streamId, byte[] key, List<byte[]> values) Ingests stream message associated with a Stream OCIDcom.oracle.bmc.streaming.responses.PutMessagesResponseputMessages(String streamId, com.oracle.bmc.streaming.model.PutMessagesDetails putMessagesDetails) Ingests stream message associated with a Stream OCID
-
Constructor Details
-
StreamingImpl
public StreamingImpl(com.oracle.bmc.streaming.Stream stream, com.oracle.bmc.streaming.StreamAdmin streamAdmin)
-
-
Method Details
-
createStream
public com.oracle.bmc.streaming.responses.CreateStreamResponse createStream(String name, String streamPoolId, Integer partitions, Integer retentionInHours) creates stream resource in OCI- Specified by:
createStreamin interfaceStreaming- Parameters:
name- name of the streamstreamPoolId- OCID of the stream poolpartitions- number of partitionsretentionInHours- retention In Hours for messages in the stream- Returns:
- CreateStreamResponse
-
createStreamPool
public com.oracle.bmc.streaming.responses.CreateStreamPoolResponse createStreamPool(String name, String compartmentId) creates stream pool resource in OCI- Specified by:
createStreamPoolin interfaceStreaming- Parameters:
name- name of the streamcompartmentId- OCID of the compartment- Returns:
- CreateStreamPoolResponse
-
deleteStream
deletes stream resource from OCI- Specified by:
deleteStreamin interfaceStreaming- Parameters:
streamId- OCID of the stream resource- Returns:
- DeleteStreamResponse
-
deleteStreamPool
public com.oracle.bmc.streaming.responses.DeleteStreamPoolResponse deleteStreamPool(String streamPoolId) deletes stream pool resource from OCI- Specified by:
deleteStreamPoolin interfaceStreaming- Parameters:
streamPoolId- OCID of the stream pool resource- Returns:
- DeleteStreamResponse
-
getClient
public com.oracle.bmc.streaming.Stream getClient()Direct instance of OCI Java SDK streaming Client. -
getAdminClient
public com.oracle.bmc.streaming.StreamAdmin getAdminClient()Direct instance of OCI Java SDK streaming Admin Client.- Specified by:
getAdminClientin interfaceStreaming- Returns:
- StreamAdmin
-
putMessages
public com.oracle.bmc.streaming.responses.PutMessagesResponse putMessages(String streamId, byte[] key, List<byte[]> values) Ingests stream message associated with a Stream OCID- Specified by:
putMessagesin interfaceStreaming- Parameters:
streamId- OCID of the stream resourcekey- Key of the content of the stream message to be ingestedvalues- list of values of the content of the stream message to be ingested for a corresponding key- Returns:
- PutMessagesResponse
-
putMessages
public com.oracle.bmc.streaming.responses.PutMessagesResponse putMessages(String streamId, com.oracle.bmc.streaming.model.PutMessagesDetails putMessagesDetails) Ingests stream message associated with a Stream OCID- Specified by:
putMessagesin interfaceStreaming- Parameters:
streamId- OCID of the stream resourceputMessagesDetails- Content of the stream message to be ingested- Returns:
- PutMessagesResponse
-
getMessages
public com.oracle.bmc.streaming.responses.GetMessagesResponse getMessages(String streamId, String cursor) Retrieves stream message associated with a Stream OCID- Specified by:
getMessagesin interfaceStreaming- Parameters:
streamId- OCID of the stream resourcecursor- its cursor which determines the starting point from which the stream will be consumed.- Returns:
- GetMessagesResponse
-
createCursor
public com.oracle.bmc.streaming.responses.CreateCursorResponse createCursor(String streamId, Long offset, Date time, com.oracle.bmc.streaming.model.CreateCursorDetails.Type type, String partition) Creates a cursor point from where Content of the stream message to be retrieved- Specified by:
createCursorin interfaceStreaming- Parameters:
streamId- OCID of the stream resourceoffset- The offset to consume from if the cursor type is AT_OFFSET or AFTER_OFFSET.time- The time to consume from if the cursor type is AT_TIME, expressed in RFC 3339 timestamp format.type- The type of cursor, which determines the starting point from which the stream will be consumed.partition- The partition to get messages from.- Returns:
- CreateCursorResponse
-
createGroupCursor
public com.oracle.bmc.streaming.responses.CreateGroupCursorResponse createGroupCursor(String streamId, String groupName, Date time, com.oracle.bmc.streaming.model.CreateGroupCursorDetails.Type type, Boolean commitOnGet, String instanceName, Integer timeoutInMs) Creates a group-cursor point from where Content of the stream message to be retrieved- Specified by:
createGroupCursorin interfaceStreaming- Parameters:
streamId- OCID of the stream resourcegroupName- Name of the consumer group.time- The time to consume from if type is AT_TIME.type- The type of cursor, which determines the starting point from which the stream will be consumed.commitOnGet- When using consumer-groups, the default commit-on-get behaviour can be overriden by setting this value to false.instanceName- A unique identifier for the instance joining the consumer group.timeoutInMs- The amount of a consumer instance inactivity time, before partition reservations are released.- Returns:
- CreateGroupCursorResponse
-