Package com.couchbase.client.core
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 Summary
Constructors Constructor Description CoreContext(CoreEnvironment environment, com.lmax.disruptor.RingBuffer<ResponseEvent> responseRingBuffer)
Creates a newCoreContext
with no core id.CoreContext(CoreEnvironment environment, com.lmax.disruptor.RingBuffer<ResponseEvent> responseRingBuffer, long coreId)
Creates a newCoreContext
with no a core id. -
Method Summary
Modifier and Type Method Description long
coreId()
The core it, 0 if not set.CoreEnvironment
environment()
Returns the current environment.com.lmax.disruptor.RingBuffer<ResponseEvent>
responseRingBuffer()
Returns the response ring buffer.
-
Constructor Details
-
CoreContext
public CoreContext(CoreEnvironment environment, com.lmax.disruptor.RingBuffer<ResponseEvent> responseRingBuffer)Creates a newCoreContext
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 newCoreContext
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
Returns the current environment. -
responseRingBuffer
Returns the response ring buffer. -
coreId
public long coreId()The core it, 0 if not set.
-