public interface CoreEnvironment
A CoreEnvironment
provides all the core building blocks like environment settings and thread pools so that the application can work with it properly.
This interface defines the contract. How properties are loaded is chosen by the implementation. See the DefaultCoreEnvironment
class for the default implementation.
Note that the CoreEnvironment
is stateful, so be sure to call shutdown()
properly.
Modifier and Type | Method and Description |
---|---|
long |
autoreleaseAfter()
The time in milliseconds after which a non-subscribed observable is going to be automatically released.
|
int |
bootstrapCarrierDirectPort()
The port to use when bootstrapping through carrier publication without SSL.
|
boolean |
bootstrapCarrierEnabled() |
int |
bootstrapCarrierSslPort()
The port to use when bootstrapping through carrier publication with SSL.
|
int |
bootstrapHttpDirectPort()
The port to use when bootstrapping through HTTP without SSL.
|
boolean |
bootstrapHttpEnabled() |
int |
bootstrapHttpSslPort()
The port to use when bootstrapping through HTTP with SSL.
|
boolean |
bufferPoolingEnabled()
Returns if buffer pooling is enabled for greater GC efficiency.
|
int |
computationPoolSize() |
boolean |
dcpEnabled()
Identifies if DCP should be enabled.
|
EventBus |
eventBus()
Returns the event bus where events are broadcasted on and can be published to.
|
EventLoopGroup |
ioPool()
Returns the IO pool for the underlying IO framework.
|
int |
ioPoolSize()
Returns the configured IO pool size.
|
long |
keepAliveInterval()
The time in milliseconds after which some service will issue a form of keep-alive request.
|
int |
kvEndpoints()
The number of key/value service endpoints.
|
long |
maxRequestLifetime()
Returns the maximum time in milliseconds a request is allowed to life.
|
Delay |
observeIntervalDelay()
|
String |
packageNameAndVersion()
Returns name and the version of the package.
|
boolean |
queryEnabled() |
int |
queryEndpoints()
The number of query service endpoints.
|
int |
queryPort() |
Delay |
reconnectDelay()
Returns the
Delay for node reconnects. |
int |
requestBufferSize()
Returns the size of the request ringbuffer.
|
int |
responseBufferSize()
Returns the size of the response ringbuffer.
|
Delay |
retryDelay()
Returns the
Delay for request retries. |
RetryStrategy |
retryStrategy()
The retry strategy on how to dispatch requests in the failure case.
|
Scheduler |
scheduler()
Returns the scheduler which should be used for all core actions that need to happen asynchronously.
|
Observable<Boolean> |
shutdown()
Shutdown the
CoreEnvironment . |
boolean |
sslEnabled()
Identifies if SSL should be enabled.
|
String |
sslKeystoreFile() |
String |
sslKeystorePassword() |
String |
userAgent()
Library identification string, which can be used as User-Agent header in HTTP requests.
|
int |
viewEndpoints()
The number of view service endpoints.
|
Observable<Boolean> shutdown()
Shutdown the CoreEnvironment
.
EventLoopGroup ioPool()
Returns the IO pool for the underlying IO framework.
Scheduler scheduler()
Returns the scheduler which should be used for all core actions that need to happen asynchronously.
boolean dcpEnabled()
Identifies if DCP should be enabled.
boolean sslEnabled()
Identifies if SSL should be enabled.
String sslKeystoreFile()
String sslKeystorePassword()
boolean queryEnabled()
int queryPort()
boolean bootstrapHttpEnabled()
boolean bootstrapCarrierEnabled()
int bootstrapHttpDirectPort()
The port to use when bootstrapping through HTTP without SSL.
int bootstrapHttpSslPort()
The port to use when bootstrapping through HTTP with SSL.
int bootstrapCarrierDirectPort()
The port to use when bootstrapping through carrier publication without SSL.
int bootstrapCarrierSslPort()
The port to use when bootstrapping through carrier publication with SSL.
int ioPoolSize()
Returns the configured IO pool size.
int computationPoolSize()
Delay observeIntervalDelay()
Delay reconnectDelay()
Returns the Delay
for node reconnects.
Delay retryDelay()
Returns the Delay
for request retries.
int requestBufferSize()
Returns the size of the request ringbuffer.
int responseBufferSize()
Returns the size of the response ringbuffer.
int kvEndpoints()
The number of key/value service endpoints.
int viewEndpoints()
The number of view service endpoints.
int queryEndpoints()
The number of query service endpoints.
String userAgent()
Library identification string, which can be used as User-Agent header in HTTP requests.
String packageNameAndVersion()
Returns name and the version of the package. This method used to by @{link userAgent()}.
RetryStrategy retryStrategy()
The retry strategy on how to dispatch requests in the failure case.
long maxRequestLifetime()
Returns the maximum time in milliseconds a request is allowed to life.
If the best effort retry strategy is used, the request will still be cancelled after this period to make sure that requests are not sticking around forever. Make sure it is longer than any timeout you potentially have configured.
long autoreleaseAfter()
The time in milliseconds after which a non-subscribed observable is going to be automatically released.
This prevents accidentally leaking buffers when requested but not consumed by the user.
long keepAliveInterval()
The time in milliseconds after which some service will issue a form of keep-alive request.
EventBus eventBus()
Returns the event bus where events are broadcasted on and can be published to.
boolean bufferPoolingEnabled()
Returns if buffer pooling is enabled for greater GC efficiency.
In general this is always set to true and should only be set to false if there are leaks reported that are not fixable by correcting user level code.
Copyright © 2014 Couchbase, Inc.