public static final class AeronArchive.Context extends Object implements Cloneable
The context will be owned by AeronArchive after a successful
AeronArchive.connect(Context) and closed via AeronArchive.close().
| Constructor and Description |
|---|
Context() |
| Modifier and Type | Method and Description |
|---|---|
Aeron |
aeron()
Aeron client for communicating with the local Media Driver. |
AeronArchive.Context |
aeron(Aeron aeron)
Aeron client for communicating with the local Media Driver. |
String |
aeronDirectoryName()
Get the top level Aeron directory used for communication between the Aeron client and Media Driver.
|
AeronArchive.Context |
aeronDirectoryName(String aeronDirectoryName)
Set the top level Aeron directory used for communication between the Aeron client and Media Driver.
|
AgentInvoker |
agentInvoker()
Get the
AgentInvoker to be invoked in addition to any invoker used by the aeron() instance. |
AeronArchive.Context |
agentInvoker(AgentInvoker agentInvoker)
Set the
AgentInvoker to be invoked in addition to any invoker used by the aeron() instance. |
AeronArchive.Context |
clone()
Perform a shallow copy of the object.
|
void |
close()
Close the context and free applicable resources.
|
void |
conclude()
Conclude configuration by setting up defaults when specifics are not provided.
|
int |
controlMtuLength()
Get the MTU length for the control streams.
|
AeronArchive.Context |
controlMtuLength(int controlMtuLength)
Set the MTU length for the control streams.
|
String |
controlRequestChannel()
Get the channel parameter for the control request channel.
|
AeronArchive.Context |
controlRequestChannel(String channel)
Set the channel parameter for the control request channel.
|
int |
controlRequestStreamId()
Get the stream id for the control request channel.
|
AeronArchive.Context |
controlRequestStreamId(int streamId)
Set the stream id for the control request channel.
|
String |
controlResponseChannel()
Get the channel parameter for the control response channel.
|
AeronArchive.Context |
controlResponseChannel(String channel)
Set the channel parameter for the control response channel.
|
int |
controlResponseStreamId()
Get the stream id for the control response channel.
|
AeronArchive.Context |
controlResponseStreamId(int streamId)
Set the stream id for the control response channel.
|
int |
controlTermBufferLength()
Get the term buffer length for the control streams.
|
AeronArchive.Context |
controlTermBufferLength(int controlTermBufferLength)
Set the term buffer length for the control streams.
|
boolean |
controlTermBufferSparse()
Should the control streams use sparse file term buffers.
|
AeronArchive.Context |
controlTermBufferSparse(boolean controlTermBufferSparse)
Should the control streams use sparse file term buffers.
|
CredentialsSupplier |
credentialsSupplier()
Get the
CredentialsSupplier to be used for authentication with the archive. |
AeronArchive.Context |
credentialsSupplier(CredentialsSupplier credentialsSupplier)
Set the
CredentialsSupplier to be used for authentication with the archive. |
ErrorHandler |
errorHandler()
Get the error handler that will be called for asynchronous errors.
|
AeronArchive.Context |
errorHandler(ErrorHandler errorHandler)
Handle errors returned asynchronously from the archive for a control session.
|
IdleStrategy |
idleStrategy()
Get the
IdleStrategy used when waiting for responses. |
AeronArchive.Context |
idleStrategy(IdleStrategy idleStrategy)
Set the
IdleStrategy used when waiting for responses. |
Lock |
lock()
Get the
Lock that is used to provide mutual exclusion in the AeronArchive client. |
AeronArchive.Context |
lock(Lock lock)
The
Lock that is used to provide mutual exclusion in the AeronArchive client. |
long |
messageTimeoutNs()
The message timeout in nanoseconds to wait for sending or receiving a message.
|
AeronArchive.Context |
messageTimeoutNs(long messageTimeoutNs)
Set the message timeout in nanoseconds to wait for sending or receiving a message.
|
boolean |
ownsAeronClient()
Does this context own the
aeron() client and thus takes responsibility for closing it? |
AeronArchive.Context |
ownsAeronClient(boolean ownsAeronClient)
Does this context own the
aeron() client and thus takes responsibility for closing it? |
String |
recordingEventsChannel()
Get the channel URI on which the recording events publication will publish.
|
AeronArchive.Context |
recordingEventsChannel(String recordingEventsChannel)
Set the channel URI on which the recording events publication will publish.
|
int |
recordingEventsStreamId()
Get the stream id on which the recording events publication will publish.
|
AeronArchive.Context |
recordingEventsStreamId(int recordingEventsStreamId)
Set the stream id on which the recording events publication will publish.
|
RecordingSignalConsumer |
recordingSignalConsumer()
Set the
RecordingSignalConsumer to will be called when polling for responses from an Archive. |
AeronArchive.Context |
recordingSignalConsumer(RecordingSignalConsumer recordingSignalConsumer)
Set the
RecordingSignalConsumer to will be called when polling for responses from an Archive. |
String |
toString() |
public AeronArchive.Context clone()
public void conclude()
public AeronArchive.Context messageTimeoutNs(long messageTimeoutNs)
messageTimeoutNs - to wait for sending or receiving a message.AeronArchive.Configuration.MESSAGE_TIMEOUT_PROP_NAMEpublic long messageTimeoutNs()
AeronArchive.Configuration.MESSAGE_TIMEOUT_PROP_NAMEpublic String recordingEventsChannel()
public AeronArchive.Context recordingEventsChannel(String recordingEventsChannel)
To support dynamic subscribers then this can be set to multicast or MDC (Multi-Destination-Cast) if multicast cannot be supported for on the available the network infrastructure.
recordingEventsChannel - channel URI on which the recording events publication will publish.CommonContext.MDC_CONTROL_PARAM_NAMEpublic int recordingEventsStreamId()
public AeronArchive.Context recordingEventsStreamId(int recordingEventsStreamId)
recordingEventsStreamId - stream id on which the recording events publication will publish.public AeronArchive.Context controlRequestChannel(String channel)
channel - parameter for the control request channel.AeronArchive.Configuration.CONTROL_CHANNEL_PROP_NAMEpublic String controlRequestChannel()
AeronArchive.Configuration.CONTROL_CHANNEL_PROP_NAMEpublic AeronArchive.Context controlRequestStreamId(int streamId)
streamId - for the control request channel.AeronArchive.Configuration.CONTROL_STREAM_ID_PROP_NAMEpublic int controlRequestStreamId()
AeronArchive.Configuration.CONTROL_STREAM_ID_PROP_NAMEpublic AeronArchive.Context controlResponseChannel(String channel)
channel - parameter for the control response channel.AeronArchive.Configuration.CONTROL_RESPONSE_CHANNEL_PROP_NAMEpublic String controlResponseChannel()
AeronArchive.Configuration.CONTROL_RESPONSE_CHANNEL_PROP_NAMEpublic AeronArchive.Context controlResponseStreamId(int streamId)
streamId - for the control response channel.AeronArchive.Configuration.CONTROL_RESPONSE_STREAM_ID_PROP_NAMEpublic int controlResponseStreamId()
AeronArchive.Configuration.CONTROL_RESPONSE_STREAM_ID_PROP_NAMEpublic AeronArchive.Context controlTermBufferSparse(boolean controlTermBufferSparse)
controlTermBufferSparse - for the control stream.AeronArchive.Configuration.CONTROL_TERM_BUFFER_SPARSE_PROP_NAMEpublic boolean controlTermBufferSparse()
true if the control stream should use sparse file term buffers.AeronArchive.Configuration.CONTROL_TERM_BUFFER_SPARSE_PROP_NAMEpublic AeronArchive.Context controlTermBufferLength(int controlTermBufferLength)
controlTermBufferLength - for the control streams.AeronArchive.Configuration.CONTROL_TERM_BUFFER_LENGTH_PROP_NAMEpublic int controlTermBufferLength()
AeronArchive.Configuration.CONTROL_TERM_BUFFER_LENGTH_PROP_NAMEpublic AeronArchive.Context controlMtuLength(int controlMtuLength)
controlMtuLength - for the control streams.AeronArchive.Configuration.CONTROL_MTU_LENGTH_PROP_NAMEpublic int controlMtuLength()
AeronArchive.Configuration.CONTROL_MTU_LENGTH_PROP_NAMEpublic AeronArchive.Context idleStrategy(IdleStrategy idleStrategy)
IdleStrategy used when waiting for responses.idleStrategy - used when waiting for responses.public IdleStrategy idleStrategy()
IdleStrategy used when waiting for responses.IdleStrategy used when waiting for responses.public AeronArchive.Context aeronDirectoryName(String aeronDirectoryName)
aeronDirectoryName - the top level Aeron directory.public String aeronDirectoryName()
public AeronArchive.Context aeron(Aeron aeron)
Aeron client for communicating with the local Media Driver.
This client will be closed when the AeronArchive.close() or close() methods are called if
ownsAeronClient() is true.
aeron - client for communicating with the local Media Driver.Aeron.connect()public Aeron aeron()
Aeron client for communicating with the local Media Driver.
If not provided then a default will be established during conclude() by calling
Aeron.connect().
public AeronArchive.Context ownsAeronClient(boolean ownsAeronClient)
aeron() client and thus takes responsibility for closing it?ownsAeronClient - does this context own the aeron() client?public boolean ownsAeronClient()
aeron() client and thus takes responsibility for closing it?aeron() client and thus takes responsibility for closing it?public AeronArchive.Context lock(Lock lock)
Lock that is used to provide mutual exclusion in the AeronArchive client.
If the AeronArchive is used from only a single thread then the lock can be set to
NoOpLock to elide the lock overhead.
lock - that is used to provide mutual exclusion in the AeronArchive client.public Lock lock()
Lock that is used to provide mutual exclusion in the AeronArchive client.Lock that is used to provide mutual exclusion in the AeronArchive client.public AeronArchive.Context errorHandler(ErrorHandler errorHandler)
errorHandler - method to handle objects of type Throwable.public ErrorHandler errorHandler()
public AeronArchive.Context credentialsSupplier(CredentialsSupplier credentialsSupplier)
CredentialsSupplier to be used for authentication with the archive.credentialsSupplier - to be used for authentication with the archive.public CredentialsSupplier credentialsSupplier()
CredentialsSupplier to be used for authentication with the archive.CredentialsSupplier to be used for authentication with the archive.public AeronArchive.Context recordingSignalConsumer(RecordingSignalConsumer recordingSignalConsumer)
RecordingSignalConsumer to will be called when polling for responses from an Archive.recordingSignalConsumer - to called with recording signal events.public RecordingSignalConsumer recordingSignalConsumer()
RecordingSignalConsumer to will be called when polling for responses from an Archive.public AeronArchive.Context agentInvoker(AgentInvoker agentInvoker)
AgentInvoker to be invoked in addition to any invoker used by the aeron() instance.
Useful for when running on a low thread count scenario.
agentInvoker - to be invoked while awaiting a response in the client.public AgentInvoker agentInvoker()
AgentInvoker to be invoked in addition to any invoker used by the aeron() instance.AgentInvoker that is used.public void close()
If ownsAeronClient() is true then the aeron() client will be closed.
Copyright © 2014-2023 Real Logic Limited. All Rights Reserved.