Class StreamingImpl

java.lang.Object
com.oracle.cloud.spring.streaming.StreamingImpl
All Implemented Interfaces:
Streaming

public class StreamingImpl extends Object implements Streaming
Implementation of the OCI streaming module.
  • Constructor Summary

    Constructors
    Constructor
    Description
    StreamingImpl(com.oracle.bmc.streaming.Stream stream, com.oracle.bmc.streaming.StreamAdmin streamAdmin)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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
    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
    com.oracle.bmc.streaming.responses.CreateStreamResponse
    createStream(String name, String streamPoolId, Integer partitions, Integer retentionInHours)
    creates stream resource in OCI
    com.oracle.bmc.streaming.responses.CreateStreamPoolResponse
    createStreamPool(String name, String compartmentId)
    creates stream pool resource in OCI
    com.oracle.bmc.streaming.responses.DeleteStreamResponse
    deleteStream(String streamId)
    deletes stream resource from OCI
    com.oracle.bmc.streaming.responses.DeleteStreamPoolResponse
    deleteStreamPool(String streamPoolId)
    deletes stream pool resource from OCI
    com.oracle.bmc.streaming.StreamAdmin
    Direct instance of OCI Java SDK streaming Admin Client.
    com.oracle.bmc.streaming.Stream
    Direct instance of OCI Java SDK streaming Client.
    com.oracle.bmc.streaming.responses.GetMessagesResponse
    getMessages(String streamId, String cursor)
    Retrieves stream message associated with a Stream OCID
    com.oracle.bmc.streaming.responses.PutMessagesResponse
    putMessages(String streamId, byte[] key, List<byte[]> values)
    Ingests stream message associated with a Stream OCID
    com.oracle.bmc.streaming.responses.PutMessagesResponse
    putMessages(String streamId, com.oracle.bmc.streaming.model.PutMessagesDetails putMessagesDetails)
    Ingests stream message associated with a Stream OCID

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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:
      createStream in interface Streaming
      Parameters:
      name - name of the stream
      streamPoolId - OCID of the stream pool
      partitions - number of partitions
      retentionInHours - 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:
      createStreamPool in interface Streaming
      Parameters:
      name - name of the stream
      compartmentId - OCID of the compartment
      Returns:
      CreateStreamPoolResponse
    • deleteStream

      public com.oracle.bmc.streaming.responses.DeleteStreamResponse deleteStream(String streamId)
      deletes stream resource from OCI
      Specified by:
      deleteStream in interface Streaming
      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:
      deleteStreamPool in interface Streaming
      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.
      Specified by:
      getClient in interface Streaming
      Returns:
      Stream
    • getAdminClient

      public com.oracle.bmc.streaming.StreamAdmin getAdminClient()
      Direct instance of OCI Java SDK streaming Admin Client.
      Specified by:
      getAdminClient in interface Streaming
      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:
      putMessages in interface Streaming
      Parameters:
      streamId - OCID of the stream resource
      key - Key of the content of the stream message to be ingested
      values - 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:
      putMessages in interface Streaming
      Parameters:
      streamId - OCID of the stream resource
      putMessagesDetails - 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:
      getMessages in interface Streaming
      Parameters:
      streamId - OCID of the stream resource
      cursor - 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:
      createCursor in interface Streaming
      Parameters:
      streamId - OCID of the stream resource
      offset - 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:
      createGroupCursor in interface Streaming
      Parameters:
      streamId - OCID of the stream resource
      groupName - 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