public static class MediaDriver.Context extends CommonContext
MediaDriver that can be used to override Configuration.
Note: Do not reuse instances of this MediaDriver.Context across different MediaDrivers.
The context will be owned by DriverConductor after a successful
MediaDriver.launch(Context) and closed via MediaDriver.close().
AERON_DIR_PROP_DEFAULT, AERON_DIR_PROP_NAME, ALIAS_PARAM_NAME, DEFAULT_DRIVER_TIMEOUT_MS, DRIVER_TIMEOUT_MS, DRIVER_TIMEOUT_PROP_NAME, ENDPOINT_PARAM_NAME, INITIAL_TERM_ID_PARAM_NAME, INTERFACE_PARAM_NAME, IPC_CHANNEL, IPC_MEDIA, LINGER_PARAM_NAME, MDC_CONTROL_MODE_DYNAMIC, MDC_CONTROL_MODE_MANUAL, MDC_CONTROL_MODE_PARAM_NAME, MDC_CONTROL_PARAM_NAME, MTU_LENGTH_PARAM_NAME, NULL_SESSION_ID, RELIABLE_STREAM_PARAM_NAME, SESSION_ID_PARAM_NAME, SPARSE_PARAM_NAME, SPY_PREFIX, TAG_PREFIX, TAGS_PARAM_NAME, TERM_ID_PARAM_NAME, TERM_LENGTH_PARAM_NAME, TERM_OFFSET_PARAM_NAME, TTL_PARAM_NAME, UDP_MEDIA| Constructor and Description |
|---|
Context() |
| Modifier and Type | Method and Description |
|---|---|
MediaDriver.Context |
aeronDirectoryName(java.lang.String dirName)
Set the top level Aeron directory used for communication between the client and Media Driver, and the location
of the data buffers.
|
byte[] |
applicationSpecificFeedback()
Application specific feedback used to identify a receiver groups when using a
PreferredMulticastFlowControl strategy which is added to Status Messages (SMs).. |
MediaDriver.Context |
applicationSpecificFeedback(byte[] asfBytes)
Application specific feedback used to identify a receiver groups when using a
PreferredMulticastFlowControl strategy which is added to Status Messages (SMs). |
org.agrona.concurrent.CachedEpochClock |
cachedEpochClock()
The
CachedEpochClock as a source of time in milliseconds for wall clock time. |
MediaDriver.Context |
cachedEpochClock(org.agrona.concurrent.CachedEpochClock clock)
The
CachedEpochClock as a source of time in milliseconds for wall clock time. |
org.agrona.concurrent.CachedNanoClock |
cachedNanoClock()
The
CachedNanoClock as a source of time in nanoseconds for measuring duration. |
MediaDriver.Context |
cachedNanoClock(org.agrona.concurrent.CachedNanoClock clock)
The
CachedNanoClock as a source of time in nanoseconds for measuring duration. |
long |
clientLivenessTimeoutNs()
Time in nanoseconds after which a client is considered dead if a keep alive is not received.
|
MediaDriver.Context |
clientLivenessTimeoutNs(long timeoutNs)
Time in nanoseconds after which a client is considered dead if a keep alive is not received.
|
MediaDriver.Context |
clone()
Perform a shallow copy of the object.
|
void |
close()
Free up resources but don't delete files in case they are required for debugging.
|
MediaDriver.Context |
conclude()
This completes initialization of the CommonContext object.
|
org.agrona.concurrent.IdleStrategy |
conductorIdleStrategy()
IdleStrategy to be used by the DriverConductor when in ThreadingMode.DEDICATED
or ThreadingMode.SHARED_NETWORK. |
MediaDriver.Context |
conductorIdleStrategy(org.agrona.concurrent.IdleStrategy strategy)
IdleStrategy to be used by the DriverConductor when in ThreadingMode.DEDICATED
or ThreadingMode.SHARED_NETWORK. |
java.util.concurrent.ThreadFactory |
conductorThreadFactory()
ThreadFactory to be used for creating agent thread for the DriverConductor when running in
ThreadingMode.DEDICATED or ThreadingMode.SHARED_NETWORK. |
MediaDriver.Context |
conductorThreadFactory(java.util.concurrent.ThreadFactory factory)
ThreadFactory to be used for creating agent thread for the DriverConductor when running in
ThreadingMode.DEDICATED or ThreadingMode.SHARED_NETWORK. |
MediaDriver.Context |
congestControlSupplier(CongestionControlSupplier supplier)
Supplier of dynamically created
CongestionControl strategies for individual connections. |
CongestionControlSupplier |
congestionControlSupplier()
Supplier of dynamically created
CongestionControl strategies for individual connections. |
long |
counterFreeToReuseTimeoutNs()
Time in nanoseconds after which a freed counter may be reused.
|
MediaDriver.Context |
counterFreeToReuseTimeoutNs(long counterFreeToReuseTimeoutNs)
Time in nanoseconds after which a freed counter may be reused.
|
org.agrona.concurrent.status.CountersManager |
countersManager()
Get the
CountersManager that has been concluded for this context. |
MediaDriver.Context |
countersManager(org.agrona.concurrent.status.CountersManager countersManager)
Set the
CountersManager to override the one that would have been concluded. |
MediaDriver.Context |
countersMetaDataBuffer(org.agrona.concurrent.UnsafeBuffer countersMetaDataBuffer)
Set the buffer containing the counter meta data.
|
MediaDriver.Context |
countersValuesBuffer(org.agrona.concurrent.UnsafeBuffer countersValuesBuffer)
Set the buffer containing the counters.
|
boolean |
dirDeleteOnStart()
Will the driver attempt to immediately delete
CommonContext.aeronDirectoryName() on startup. |
MediaDriver.Context |
dirDeleteOnStart(boolean dirDeleteOnStart)
Should the driver attempt to immediately delete
CommonContext.aeronDirectoryName() on startup. |
MediaDriver.Context |
driverTimeoutMs(long value)
Set the driver timeout in milliseconds
|
org.agrona.concurrent.EpochClock |
epochClock()
The
EpochClock as a source of time in milliseconds for wall clock time. |
MediaDriver.Context |
epochClock(org.agrona.concurrent.EpochClock clock)
The
EpochClock as a source of time in milliseconds for wall clock time. |
org.agrona.ErrorHandler |
errorHandler()
ErrorHandler to be used for reporting errors during Agents operations. |
MediaDriver.Context |
errorHandler(org.agrona.ErrorHandler errorHandler)
ErrorHandler to be used for reporting errors during Agents operations. |
org.agrona.concurrent.errors.DistinctErrorLog |
errorLog()
Log to which exceptions are recorded.
|
MediaDriver.Context |
errorLog(org.agrona.concurrent.errors.DistinctErrorLog errorLog)
Log to which exceptions are recorded.
|
int |
filePageSize()
Page size for alignment of all files.
|
MediaDriver.Context |
filePageSize(int filePageSize)
Page size for alignment of all files.
|
long |
imageLivenessTimeoutNs()
Time in nanoseconds an Image will be kept alive for its subscribers to consume it once disconnected.
|
MediaDriver.Context |
imageLivenessTimeoutNs(long timeout)
Time in nanoseconds an Image will be kept alive after for its subscribers to consume it once disconnected.
|
int |
initialWindowLength()
The initial window for in flight data on a connection which must be less than
Configuration.SOCKET_RCVBUF_LENGTH. |
MediaDriver.Context |
initialWindowLength(int initialWindowLength)
The initial window for in flight data on a connection which must be less than
Configuration.SOCKET_RCVBUF_LENGTH. |
int |
ipcMtuLength()
MTU in bytes for datagrams sent over shared memory.
|
MediaDriver.Context |
ipcMtuLength(int ipcMtuLength)
MTU in bytes for datagrams sent over shared memory.
|
int |
ipcTermBufferLength()
Default length for a term buffer on a IPC publication.
|
MediaDriver.Context |
ipcTermBufferLength(int termBufferLength)
Default length for a term buffer on a IPC publication.
|
LossReport |
lossReport()
LossReportfor identifying loss issues on specific connections. |
MediaDriver.Context |
lossReport(LossReport lossReport)
LossReportfor identifying loss issues on specific connections. |
int |
mtuLength()
MTU in bytes for datagrams sent to the network.
|
MediaDriver.Context |
mtuLength(int mtuLength)
MTU in bytes for datagrams sent to the network.
|
FlowControlSupplier |
multicastFlowControlSupplier()
Supplier of dynamically created
FlowControl strategies for multicast connections. |
MediaDriver.Context |
multicastFlowControlSupplier(FlowControlSupplier flowControlSupplier)
Supplier of dynamically created
FlowControl strategies for multicast connections. |
org.agrona.concurrent.NanoClock |
nanoClock()
The
NanoClock as a source of time in nanoseconds for measuring duration. |
MediaDriver.Context |
nanoClock(org.agrona.concurrent.NanoClock clock)
The
NanoClock as a source of time in nanoseconds for measuring duration. |
boolean |
performStorageChecks()
Should the driver perform storage checks when allocating files.
|
MediaDriver.Context |
performStorageChecks(boolean performStorageChecks)
Should the driver perform storage checks when allocating files.
|
long |
publicationConnectionTimeoutNs()
Timeout in nanoseconds after which a publication will be considered not connected if no status messages are
received.
|
MediaDriver.Context |
publicationConnectionTimeoutNs(long timeoutNs)
Timeout in nanoseconds after which a publication will be considered not connected if no status messages are
received.
|
long |
publicationLingerTimeoutNs()
Time in nanoseconds a publication will linger once it is drained to recover potential tail loss.
|
MediaDriver.Context |
publicationLingerTimeoutNs(long timeoutNs)
Time in nanoseconds a publication will linger once it is drained to recover potential tail loss.
|
int |
publicationReservedSessionIdHigh()
High end of the publication reserved session id range which will not be automatically assigned.
|
MediaDriver.Context |
publicationReservedSessionIdHigh(int sessionId)
High end of the publication reserved session id range which will not be automatically assigned.
|
int |
publicationReservedSessionIdLow()
Low end of the publication reserved session id range which will not be automatically assigned.
|
MediaDriver.Context |
publicationReservedSessionIdLow(int sessionId)
Low end of the publication reserved session id range which will not be automatically assigned.
|
int |
publicationTermBufferLength()
Default length for a term buffer on a network publication.
|
MediaDriver.Context |
publicationTermBufferLength(int termBufferLength)
Default length for a term buffer on a network publication.
|
long |
publicationUnblockTimeoutNs()
Timeout in nanoseconds after which a publication will be unblocked if a offer is partially complete to allow
other publishers to make progress.
|
MediaDriver.Context |
publicationUnblockTimeoutNs(long timeoutNs)
Timeout in nanoseconds after which a publication will be unblocked if a offer is partially complete to allow
other publishers to make progress.
|
ReceiveChannelEndpointSupplier |
receiveChannelEndpointSupplier()
Supplier of dynamically created
ReceiveChannelEndpoint subclasses for specialising interactions
with the receive side of a network channel. |
MediaDriver.Context |
receiveChannelEndpointSupplier(ReceiveChannelEndpointSupplier supplier)
Supplier of dynamically created
ReceiveChannelEndpoint subclasses for specialising interactions
with the receive side of a network channel. |
ReceiveChannelEndpointThreadLocals |
receiveChannelEndpointThreadLocals()
The thread local buffers and associated objects for use by subclasses of
ReceiveChannelEndpoint. |
MediaDriver.Context |
receiveChannelEndpointThreadLocals(ReceiveChannelEndpointThreadLocals threadLocals)
The thread local buffers and associated objects for use by subclasses of
ReceiveChannelEndpoint. |
org.agrona.concurrent.IdleStrategy |
receiverIdleStrategy()
|
MediaDriver.Context |
receiverIdleStrategy(org.agrona.concurrent.IdleStrategy strategy)
|
java.util.concurrent.ThreadFactory |
receiverThreadFactory()
ThreadFactory to be used for creating agent thread for the Receiver when running in
ThreadingMode.DEDICATED. |
MediaDriver.Context |
receiverThreadFactory(java.util.concurrent.ThreadFactory factory)
ThreadFactory to be used for creating agent thread for the Receiver when running in
ThreadingMode.DEDICATED. |
SendChannelEndpointSupplier |
sendChannelEndpointSupplier()
Supplier of dynamically created
SendChannelEndpoint subclasses for specialising interactions
with the send side of a network channel. |
MediaDriver.Context |
sendChannelEndpointSupplier(SendChannelEndpointSupplier supplier)
Supplier of dynamically created
SendChannelEndpoint subclasses for specialising interactions
with the send side of a network channel. |
org.agrona.concurrent.IdleStrategy |
senderIdleStrategy()
|
MediaDriver.Context |
senderIdleStrategy(org.agrona.concurrent.IdleStrategy strategy)
|
java.util.concurrent.ThreadFactory |
senderThreadFactory()
ThreadFactory to be used for creating agent thread for the Sender when running in
ThreadingMode.DEDICATED. |
MediaDriver.Context |
senderThreadFactory(java.util.concurrent.ThreadFactory factory)
ThreadFactory to be used for creating agent thread for the Sender when running in
ThreadingMode.DEDICATED. |
org.agrona.concurrent.IdleStrategy |
sharedIdleStrategy()
IdleStrategy to be used by the Sender, Receiver and DriverConductor
agents when in ThreadingMode.SHARED. |
MediaDriver.Context |
sharedIdleStrategy(org.agrona.concurrent.IdleStrategy strategy)
IdleStrategy to be used by the Sender, Receiver and DriverConductor
agents when in ThreadingMode.SHARED. |
org.agrona.concurrent.IdleStrategy |
sharedNetworkIdleStrategy()
|
MediaDriver.Context |
sharedNetworkIdleStrategy(org.agrona.concurrent.IdleStrategy strategy)
|
java.util.concurrent.ThreadFactory |
sharedNetworkThreadFactory()
ThreadFactory to be used for creating agent thread for the sender and receiver agents as a
CompositeAgent when running in ThreadingMode.SHARED_NETWORK. |
MediaDriver.Context |
sharedNetworkThreadFactory(java.util.concurrent.ThreadFactory factory)
ThreadFactory to be used for creating agent thread for the sender and receiver agents as a
CompositeAgent when running in ThreadingMode.SHARED_NETWORK. |
java.util.concurrent.ThreadFactory |
sharedThreadFactory()
ThreadFactory to be used for creating agent thread for the all driver agents as a
CompositeAgent when running in ThreadingMode.SHARED. |
MediaDriver.Context |
sharedThreadFactory(java.util.concurrent.ThreadFactory factory)
ThreadFactory to be used for creating agent thread for the all driver agents as a
CompositeAgent when running in ThreadingMode.SHARED. |
boolean |
spiesSimulateConnection()
Does a spy subscription simulate a connection to a network publication.
|
MediaDriver.Context |
spiesSimulateConnection(boolean spiesSimulateConnection)
Does a spy subscription simulate a connection to a network publication.
|
long |
statusMessageTimeoutNs()
Time in nanoseconds after which a status message will be sent if data is flowing slowly.
|
MediaDriver.Context |
statusMessageTimeoutNs(long statusMessageTimeoutNs)
Time in nanoseconds after which a status message will be sent if data is flowing slowly.
|
SystemCounters |
systemCounters()
The
SystemCounters for the driver for recording aggregate events of system status. |
MediaDriver.Context |
systemCounters(SystemCounters systemCounters)
The
SystemCounters for the driver for recording aggregate events of system status. |
org.agrona.MutableDirectBuffer |
tempBuffer()
The temporary buffer than can be used to build up counter labels to avoid allocation.
|
MediaDriver.Context |
tempBuffer(org.agrona.MutableDirectBuffer tempBuffer)
Set the temporary buffer than can be used to build up counter labels to avoid allocation.
|
boolean |
termBufferSparseFile()
Should the term buffers be created with sparse files?
|
MediaDriver.Context |
termBufferSparseFile(boolean termBufferSparseFile)
Should the term buffer be created with sparse files?
|
ThreadingMode |
threadingMode()
ThreadingMode that should be used for the driver. |
MediaDriver.Context |
threadingMode(ThreadingMode threadingMode)
ThreadingMode that should be used for the driver. |
long |
timerIntervalNs()
Interval in nanoseconds between checks for timers and timeouts.
|
MediaDriver.Context |
timerIntervalNs(long timerIntervalNs)
Interval in nanoseconds between checks for timers and timeouts.
|
FlowControlSupplier |
unicastFlowControlSupplier()
Supplier of dynamically created
FlowControl strategies for unicast connections. |
MediaDriver.Context |
unicastFlowControlSupplier(FlowControlSupplier flowControlSupplier)
Supplier of dynamically created
FlowControl strategies for unicast connections. |
boolean |
useConcurrentCountersManager()
Should a
ConcurrentCountersManager be used to allow for cross thread usage. |
MediaDriver.Context |
useConcurrentCountersManager(boolean useConcurrentCountersManager)
Should a
ConcurrentCountersManager be used to allow for cross thread usage. |
boolean |
useWindowsHighResTimer()
Should an attempt be made to use the high resolution timers for waiting on Windows.
|
MediaDriver.Context |
useWindowsHighResTimer(boolean useWindowsHighResTimers)
Should an attempt be made to use the high resolution timers for waiting on Windows.
|
boolean |
warnIfDirectoryExists()
Should a warning be issued if the
CommonContext.aeronDirectoryName() exists? |
MediaDriver.Context |
warnIfDirectoryExists(boolean warnIfDirectoryExists)
Should a warning be issued if the
CommonContext.aeronDirectoryName() exists? |
aeronDirectory, aeronDirectoryName, cncFile, concludeAeronDirectory, countersMetaDataBuffer, countersValuesBuffer, deleteAeronDirectory, driverTimeoutMs, formatError, generateRandomDirName, getAeronDirectoryName, isDriverActive, isDriverActive, isDriverActive, mapExistingCncFile, newDefaultCncFile, saveErrorLog, saveErrorLogpublic MediaDriver.Context clone()
clone in class CommonContextpublic void close()
close in class CommonContextpublic MediaDriver.Context conclude()
CommonContextconclude in class CommonContextpublic MediaDriver.Context aeronDirectoryName(java.lang.String dirName)
CommonContextaeronDirectoryName in class CommonContextdirName - New top level Aeron directory.CommonContext.aeronDirectoryName(String)public MediaDriver.Context driverTimeoutMs(long value)
CommonContextdriverTimeoutMs in class CommonContextvalue - to indicate liveness of driverCommonContext.driverTimeoutMs(long)public MediaDriver.Context countersMetaDataBuffer(org.agrona.concurrent.UnsafeBuffer countersMetaDataBuffer)
CommonContextcountersMetaDataBuffer in class CommonContextcountersMetaDataBuffer - The new counter meta data buffer.CommonContext.countersMetaDataBuffer(UnsafeBuffer)public MediaDriver.Context countersValuesBuffer(org.agrona.concurrent.UnsafeBuffer countersValuesBuffer)
CommonContextcountersValuesBuffer in class CommonContextcountersValuesBuffer - The new counters buffer.CommonContext.countersValuesBuffer(UnsafeBuffer)public MediaDriver.Context useWindowsHighResTimer(boolean useWindowsHighResTimers)
useWindowsHighResTimers - Should an attempt be made to use the high-res timers for waiting on Windows.public boolean useWindowsHighResTimer()
public boolean warnIfDirectoryExists()
CommonContext.aeronDirectoryName() exists?CommonContext.aeronDirectoryName() exists?public MediaDriver.Context warnIfDirectoryExists(boolean warnIfDirectoryExists)
CommonContext.aeronDirectoryName() exists?warnIfDirectoryExists - warn if the CommonContext.aeronDirectoryName() exists?public boolean dirDeleteOnStart()
CommonContext.aeronDirectoryName() on startup.public MediaDriver.Context dirDeleteOnStart(boolean dirDeleteOnStart)
CommonContext.aeronDirectoryName() on startup.dirDeleteOnStart - Attempt deletion.public boolean termBufferSparseFile()
public MediaDriver.Context termBufferSparseFile(boolean termBufferSparseFile)
termBufferSparseFile - should the term buffers be created with sparse files?public boolean performStorageChecks()
public MediaDriver.Context performStorageChecks(boolean performStorageChecks)
performStorageChecks - true if the driver should perform storage checks when allocating files.public int filePageSize()
public MediaDriver.Context filePageSize(int filePageSize)
filePageSize - for alignment of file sizes.public long timerIntervalNs()
public MediaDriver.Context timerIntervalNs(long timerIntervalNs)
timerIntervalNs - nanoseconds between checks for timers and timeouts.public long imageLivenessTimeoutNs()
public MediaDriver.Context imageLivenessTimeoutNs(long timeout)
timeout - for keeping an image alive for its subscribers to consume it.public long publicationLingerTimeoutNs()
public MediaDriver.Context publicationLingerTimeoutNs(long timeoutNs)
timeoutNs - for keeping a publication once it is drained.public long clientLivenessTimeoutNs()
public MediaDriver.Context clientLivenessTimeoutNs(long timeoutNs)
timeoutNs - in nanoseconds after which a client is considered dead if a keep alive is not received.public long statusMessageTimeoutNs()
public MediaDriver.Context statusMessageTimeoutNs(long statusMessageTimeoutNs)
statusMessageTimeoutNs - after which a status message will be sent if data is flowing slowly.public long counterFreeToReuseTimeoutNs()
public MediaDriver.Context counterFreeToReuseTimeoutNs(long counterFreeToReuseTimeoutNs)
counterFreeToReuseTimeoutNs - after which a freed counter may be reused.public long publicationUnblockTimeoutNs()
public MediaDriver.Context publicationUnblockTimeoutNs(long timeoutNs)
timeoutNs - in nanoseconds after which a publication will be unblocked.public long publicationConnectionTimeoutNs()
public MediaDriver.Context publicationConnectionTimeoutNs(long timeoutNs)
timeoutNs - in nanoseconds after which a publication will be considered not connected.public boolean spiesSimulateConnection()
public MediaDriver.Context spiesSimulateConnection(boolean spiesSimulateConnection)
spiesSimulateConnection - true if a spy subscription simulates a connection to a network publication.public int publicationTermBufferLength()
public MediaDriver.Context publicationTermBufferLength(int termBufferLength)
This can be overridden on publication by using channel URI params.
termBufferLength - default length for a term buffer on a network publication.public int ipcTermBufferLength()
public MediaDriver.Context ipcTermBufferLength(int termBufferLength)
This can be overridden on publication by using channel URI params.
termBufferLength - default length for a term buffer on a IPC publication.public int initialWindowLength()
Configuration.SOCKET_RCVBUF_LENGTH. This needs to be configured for throughput respecting BDP.public MediaDriver.Context initialWindowLength(int initialWindowLength)
Configuration.SOCKET_RCVBUF_LENGTH. This needs to be configured for throughput respecting BDP.initialWindowLength - The initial window for in flight data on a connectionpublic int mtuLength()
Larger MTUs reduce system call overhead at the expense of possible increase in loss which will need to be recovered. If this is greater than the network MTU for UDP then the packet will be fragmented and can amplify the impact of loss.
public MediaDriver.Context mtuLength(int mtuLength)
Larger MTUs reduce system call overhead at the expense of possible increase in loss which will need to be recovered. If this is greater than the network MTU for UDP then the packet will be fragmented and can amplify the impact of loss.
mtuLength - in bytes for datagrams sent to the network.public int ipcMtuLength()
Larger MTUs reduce fragmentation. If an IPC stream is recorded to be later sent over the network then then a large MTU may be an issue.
public MediaDriver.Context ipcMtuLength(int ipcMtuLength)
Larger MTUs reduce fragmentation. If an IPC stream is recorded to be later sent over the network then then a large MTU may be an issue.
ipcMtuLength - in bytes for message fragments.public org.agrona.concurrent.EpochClock epochClock()
EpochClock as a source of time in milliseconds for wall clock time.EpochClock as a source of time in milliseconds for wall clock time.public MediaDriver.Context epochClock(org.agrona.concurrent.EpochClock clock)
EpochClock as a source of time in milliseconds for wall clock time.clock - to be used.public org.agrona.concurrent.NanoClock nanoClock()
NanoClock as a source of time in nanoseconds for measuring duration.NanoClock as a source of time in nanoseconds for measuring duration.public MediaDriver.Context nanoClock(org.agrona.concurrent.NanoClock clock)
NanoClock as a source of time in nanoseconds for measuring duration.clock - to be used.public org.agrona.concurrent.CachedEpochClock cachedEpochClock()
CachedEpochClock as a source of time in milliseconds for wall clock time.CachedEpochClock as a source of time in milliseconds for wall clock time.public MediaDriver.Context cachedEpochClock(org.agrona.concurrent.CachedEpochClock clock)
CachedEpochClock as a source of time in milliseconds for wall clock time.clock - to be used.public org.agrona.concurrent.CachedNanoClock cachedNanoClock()
CachedNanoClock as a source of time in nanoseconds for measuring duration. This is updated
once per duty cycle of the DriverConductor.CachedNanoClock as a source of time in nanoseconds for measuring duration.public MediaDriver.Context cachedNanoClock(org.agrona.concurrent.CachedNanoClock clock)
CachedNanoClock as a source of time in nanoseconds for measuring duration.clock - to be used.public ThreadingMode threadingMode()
ThreadingMode that should be used for the driver.ThreadingMode that should be used for the driver.public MediaDriver.Context threadingMode(ThreadingMode threadingMode)
ThreadingMode that should be used for the driver.threadingMode - that should be used for the driver.public java.util.concurrent.ThreadFactory senderThreadFactory()
ThreadFactory to be used for creating agent thread for the Sender when running in
ThreadingMode.DEDICATED.ThreadFactory to be used for creating agent thread for the Sender.public MediaDriver.Context senderThreadFactory(java.util.concurrent.ThreadFactory factory)
ThreadFactory to be used for creating agent thread for the Sender when running in
ThreadingMode.DEDICATED.
If none is provided then this will default a simple new operation.
factory - to be used for creating agent thread for the Sender.public java.util.concurrent.ThreadFactory receiverThreadFactory()
ThreadFactory to be used for creating agent thread for the Receiver when running in
ThreadingMode.DEDICATED.ThreadFactory to be used for creating agent thread for the Receiver.public MediaDriver.Context receiverThreadFactory(java.util.concurrent.ThreadFactory factory)
ThreadFactory to be used for creating agent thread for the Receiver when running in
ThreadingMode.DEDICATED.
If none is provided then this will default a simple new operation.
factory - to be used for creating agent thread for the Receiver.public java.util.concurrent.ThreadFactory conductorThreadFactory()
ThreadFactory to be used for creating agent thread for the DriverConductor when running in
ThreadingMode.DEDICATED or ThreadingMode.SHARED_NETWORK.ThreadFactory to be used for creating agent thread for the DriverConductor.public MediaDriver.Context conductorThreadFactory(java.util.concurrent.ThreadFactory factory)
ThreadFactory to be used for creating agent thread for the DriverConductor when running in
ThreadingMode.DEDICATED or ThreadingMode.SHARED_NETWORK.
If none is provided then this will default a simple new operation.
factory - to be used for creating agent thread for the DriverConductor.public java.util.concurrent.ThreadFactory sharedThreadFactory()
ThreadFactory to be used for creating agent thread for the all driver agents as a
CompositeAgent when running in ThreadingMode.SHARED.ThreadFactory to be used for creating agent thread for the CompositeAgent.public MediaDriver.Context sharedThreadFactory(java.util.concurrent.ThreadFactory factory)
ThreadFactory to be used for creating agent thread for the all driver agents as a
CompositeAgent when running in ThreadingMode.SHARED.
If none is provided then this will default a simple new operation.
factory - to be used for creating agent thread for the CompositeAgent.public java.util.concurrent.ThreadFactory sharedNetworkThreadFactory()
ThreadFactory to be used for creating agent thread for the sender and receiver agents as a
CompositeAgent when running in ThreadingMode.SHARED_NETWORK.ThreadFactory to be used for creating agent thread for the CompositeAgent.public MediaDriver.Context sharedNetworkThreadFactory(java.util.concurrent.ThreadFactory factory)
ThreadFactory to be used for creating agent thread for the sender and receiver agents as a
CompositeAgent when running in ThreadingMode.SHARED_NETWORK.
If none is provided then this will default a simple new operation.
factory - to be used for creating agent thread for the CompositeAgent.public org.agrona.concurrent.IdleStrategy senderIdleStrategy()
IdleStrategy to be used by the Sender when in ThreadingMode.DEDICATED.public MediaDriver.Context senderIdleStrategy(org.agrona.concurrent.IdleStrategy strategy)
strategy - to be used by the Sender when in ThreadingMode.DEDICATED.public org.agrona.concurrent.IdleStrategy receiverIdleStrategy()
IdleStrategy used by the Receiver when in ThreadingMode.DEDICATED.public MediaDriver.Context receiverIdleStrategy(org.agrona.concurrent.IdleStrategy strategy)
strategy - to be used by the Receiver when in ThreadingMode.DEDICATED.public org.agrona.concurrent.IdleStrategy conductorIdleStrategy()
IdleStrategy to be used by the DriverConductor when in ThreadingMode.DEDICATED
or ThreadingMode.SHARED_NETWORK.IdleStrategy used by the DriverConductorpublic MediaDriver.Context conductorIdleStrategy(org.agrona.concurrent.IdleStrategy strategy)
IdleStrategy to be used by the DriverConductor when in ThreadingMode.DEDICATED
or ThreadingMode.SHARED_NETWORK.strategy - to be used by the DriverConductor.public org.agrona.concurrent.IdleStrategy sharedNetworkIdleStrategy()
public MediaDriver.Context sharedNetworkIdleStrategy(org.agrona.concurrent.IdleStrategy strategy)
public org.agrona.concurrent.IdleStrategy sharedIdleStrategy()
IdleStrategy to be used by the Sender, Receiver and DriverConductor
agents when in ThreadingMode.SHARED.IdleStrategy used by the Sender, Receiver and DriverConductor.public MediaDriver.Context sharedIdleStrategy(org.agrona.concurrent.IdleStrategy strategy)
IdleStrategy to be used by the Sender, Receiver and DriverConductor
agents when in ThreadingMode.SHARED.strategy - to be used by the Sender, Receiver and DriverConductor.public SendChannelEndpointSupplier sendChannelEndpointSupplier()
SendChannelEndpoint subclasses for specialising interactions
with the send side of a network channel.SendChannelEndpoint subclasses.public MediaDriver.Context sendChannelEndpointSupplier(SendChannelEndpointSupplier supplier)
SendChannelEndpoint subclasses for specialising interactions
with the send side of a network channel.supplier - of dynamically created SendChannelEndpoint subclasses.public ReceiveChannelEndpointSupplier receiveChannelEndpointSupplier()
ReceiveChannelEndpoint subclasses for specialising interactions
with the receive side of a network channel.ReceiveChannelEndpoint subclasses.public MediaDriver.Context receiveChannelEndpointSupplier(ReceiveChannelEndpointSupplier supplier)
ReceiveChannelEndpoint subclasses for specialising interactions
with the receive side of a network channel.supplier - of dynamically created ReceiveChannelEndpoint subclasses.public ReceiveChannelEndpointThreadLocals receiveChannelEndpointThreadLocals()
ReceiveChannelEndpoint.ReceiveChannelEndpoint.public MediaDriver.Context receiveChannelEndpointThreadLocals(ReceiveChannelEndpointThreadLocals threadLocals)
ReceiveChannelEndpoint.threadLocals - for use by subclasses of ReceiveChannelEndpoint.public org.agrona.MutableDirectBuffer tempBuffer()
public MediaDriver.Context tempBuffer(org.agrona.MutableDirectBuffer tempBuffer)
tempBuffer - to be used to avoid allocation.public FlowControlSupplier unicastFlowControlSupplier()
FlowControl strategies for unicast connections.FlowControl strategies for unicast connections.public MediaDriver.Context unicastFlowControlSupplier(FlowControlSupplier flowControlSupplier)
FlowControl strategies for unicast connections.flowControlSupplier - of FlowControl strategies for unicast connections.public FlowControlSupplier multicastFlowControlSupplier()
FlowControl strategies for multicast connections.FlowControl strategies for multicast connections.public MediaDriver.Context multicastFlowControlSupplier(FlowControlSupplier flowControlSupplier)
FlowControl strategies for multicast connections.flowControlSupplier - of FlowControl strategies for multicast connections.public byte[] applicationSpecificFeedback()
PreferredMulticastFlowControl strategy which is added to Status Messages (SMs)..public MediaDriver.Context applicationSpecificFeedback(byte[] asfBytes)
PreferredMulticastFlowControl strategy which is added to Status Messages (SMs).asfBytes - for identifying the receiver group.public CongestionControlSupplier congestionControlSupplier()
CongestionControl strategies for individual connections.CongestionControl strategies for individual connections.public MediaDriver.Context congestControlSupplier(CongestionControlSupplier supplier)
CongestionControl strategies for individual connections.supplier - of dynamically created CongestionControl strategies for individual connections.public org.agrona.ErrorHandler errorHandler()
ErrorHandler to be used for reporting errors during Agents operations.ErrorHandler to be used for reporting errors during Agents operations.public MediaDriver.Context errorHandler(org.agrona.ErrorHandler errorHandler)
ErrorHandler to be used for reporting errors during Agents operations.
The default ErrorHandler will delegate to the errorLog() and output to System.err
if the log is full.
Note: ErrorHandler should be thread safe.
errorHandler - to be used for reporting errors during Agents operations.public org.agrona.concurrent.errors.DistinctErrorLog errorLog()
public MediaDriver.Context errorLog(org.agrona.concurrent.errors.DistinctErrorLog errorLog)
errorLog - to which exceptions are recorded.public boolean useConcurrentCountersManager()
ConcurrentCountersManager be used to allow for cross thread usage.ConcurrentCountersManager should be used otherwise false.public MediaDriver.Context useConcurrentCountersManager(boolean useConcurrentCountersManager)
ConcurrentCountersManager be used to allow for cross thread usage.
The default is to use a normal CountersManager from only the DriverConductor. If the
MediaDriver is to be composed into another services that allocates counters then this should be
concurrent.
useConcurrentCountersManager - true if a ConcurrentCountersManager should be used.public org.agrona.concurrent.status.CountersManager countersManager()
CountersManager that has been concluded for this context.CountersManager that has been concluded for this context.public MediaDriver.Context countersManager(org.agrona.concurrent.status.CountersManager countersManager)
CountersManager to override the one that would have been concluded.countersManager - to override the one that would have been concluded.public SystemCounters systemCounters()
SystemCounters for the driver for recording aggregate events of system status.SystemCounters for the driver for recording aggregate events of system status.public MediaDriver.Context systemCounters(SystemCounters systemCounters)
SystemCounters for the driver for recording aggregate events of system status.
The default should only be overridden for testing.
systemCounters - for the driver for recording aggregate events of system status.public LossReport lossReport()
LossReportfor identifying loss issues on specific connections.LossReport for identifying loss issues on specific connections.public MediaDriver.Context lossReport(LossReport lossReport)
LossReportfor identifying loss issues on specific connections.
The default should only be overridden for testing.
lossReport - for identifying loss issues on specific connections.public int publicationReservedSessionIdLow()
publicationReservedSessionIdHigh(),
Configuration.PUBLICATION_RESERVED_SESSION_ID_LOW_PROP_NAMEpublic MediaDriver.Context publicationReservedSessionIdLow(int sessionId)
sessionId - for low end of the publication reserved session id range which will not be automatically
assigned.publicationReservedSessionIdHigh(int),
Configuration.PUBLICATION_RESERVED_SESSION_ID_LOW_PROP_NAMEpublic int publicationReservedSessionIdHigh()
publicationReservedSessionIdLow(),
Configuration.PUBLICATION_RESERVED_SESSION_ID_HIGH_PROP_NAMEpublic MediaDriver.Context publicationReservedSessionIdHigh(int sessionId)
sessionId - for high end of the publication reserved session id range which will not be automatically
assigned.publicationReservedSessionIdLow(int),
Configuration.PUBLICATION_RESERVED_SESSION_ID_HIGH_PROP_NAMECopyright © 2014-2018 Real Logic Ltd. All Rights Reserved.