@InterfaceAudience.Private @InterfaceStability.Uncommitted public class CoreContext extends Object
The CoreContext
contains required assets which are shared on a per-core basis.
Constructor and Description |
---|
CoreContext(CoreEnvironment environment,
com.lmax.disruptor.RingBuffer<ResponseEvent> responseRingBuffer)
Creates a new
CoreContext with no core id. |
CoreContext(CoreEnvironment environment,
com.lmax.disruptor.RingBuffer<ResponseEvent> responseRingBuffer,
long coreId)
Creates a new
CoreContext with no a core id. |
Modifier and Type | Method and 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.
|
public CoreContext(CoreEnvironment environment, com.lmax.disruptor.RingBuffer<ResponseEvent> responseRingBuffer)
Creates a new CoreContext
with no core id.
environment
- the environment to share.responseRingBuffer
- the response ring buffer to share.public CoreContext(CoreEnvironment environment, com.lmax.disruptor.RingBuffer<ResponseEvent> responseRingBuffer, long coreId)
Creates a new CoreContext
with no a core id.
environment
- the environment to share.responseRingBuffer
- the response ring buffer to share.coreId
- the core id to use.public CoreEnvironment environment()
Returns the current environment.
public com.lmax.disruptor.RingBuffer<ResponseEvent> responseRingBuffer()
Returns the response ring buffer.
public long coreId()
The core it, 0 if not set.
Copyright © 2018 Couchbase, Inc.. All rights reserved.