Class CoreContext

java.lang.Object
com.couchbase.client.core.CoreContext

@Private
@Uncommitted
public class CoreContext
extends Object
The CoreContext contains required assets which are shared on a per-core basis.
Since:
1.5.6
Author:
Michael Nitschinger
  • Constructor Details

    • CoreContext

      public CoreContext​(CoreEnvironment environment, com.lmax.disruptor.RingBuffer<ResponseEvent> responseRingBuffer)
      Creates a new CoreContext with no core id.
      Parameters:
      environment - the environment to share.
      responseRingBuffer - the response ring buffer to share.
    • CoreContext

      public CoreContext​(CoreEnvironment environment, com.lmax.disruptor.RingBuffer<ResponseEvent> responseRingBuffer, long coreId)
      Creates a new CoreContext with no a core id.
      Parameters:
      environment - the environment to share.
      responseRingBuffer - the response ring buffer to share.
      coreId - the core id to use.
  • Method Details

    • environment

      public CoreEnvironment environment()
      Returns the current environment.
    • responseRingBuffer

      public com.lmax.disruptor.RingBuffer<ResponseEvent> responseRingBuffer()
      Returns the response ring buffer.
    • coreId

      public long coreId()
      The core it, 0 if not set.