Package io.aeron.archive.client
Class ReplicationParams
java.lang.Object
io.aeron.archive.client.ReplicationParams
Contains the optional parameters that can be passed to a Replication Request. Controls the behaviour of the
replication including tagging, stop position, extending destination recordings, live merging, and setting the
maximum length of the file I/O operations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongGets channel tag id for the archive subscription.channelTagId(long channelTagId) The channel used by the archive's subscription for replication will have the supplied channel tag applied to it.longDestination recording id to extend.dstRecordingId(long dstRecordingId) The recording in the local archive to extend.byte[]Gets the encoded credentials that will be used to authenticate against the source archive.encodedCredentials(byte[] encodedCredentials) Sets the encoded credentials that will be passed to the source archive for authentication.booleanintGets the maximum length for file IO operations in the replay.fileIoMaxLength(int fileIoMaxLength) The maximum size of a file operation when reading from the archive to execute the replication.inthashCode()Gets the destination for the live stream merge.liveDestination(String liveChannel) Destination for the live stream if merge is required.Channel to use for replicating the recording, empty string will mean that the default channel is used.replicationChannel(String replicationChannel) Channel use to replicate the recording.intThe session-id to be used for the replicated recording.replicationSessionId(int replicationSessionId) Sets the session-id to be used for the replicated file instead of the session id from the source archive.reset()Reset the state of the parameters to the default for reuse.Control address of the source archive to use response channels during replication.srcResponseChannel(String responseChannel) Control address of the source archive to use response channels during replication.longThe stop position for this replication request.stopPosition(long stopPosition) Set the stop position for replication, default isAeronArchive.NULL_POSITION, which will continuously replicate.longGets subscription tag id for the archive subscription.subscriptionTagId(long subscriptionTagId) The channel used by the archive's subscription for replication will have the supplied subscription tag applied to it.toString()
-
Constructor Details
-
ReplicationParams
public ReplicationParams()Initialise all parameters to defaults.
-
-
Method Details
-
reset
Reset the state of the parameters to the default for reuse.- Returns:
- this for a fluent API.
-
stopPosition
Set the stop position for replication, default isAeronArchive.NULL_POSITION, which will continuously replicate.- Parameters:
stopPosition- position to stop the replication at.- Returns:
- this for a fluent API
-
stopPosition
public long stopPosition()The stop position for this replication request.- Returns:
- stop position
-
dstRecordingId
The recording in the local archive to extend. Default isAeron.NULL_VALUEwhich will trigger the creation of a new recording in the destination archive.- Parameters:
dstRecordingId- destination recording to extend.- Returns:
- this for a fluent API.
-
dstRecordingId
public long dstRecordingId()Destination recording id to extend.- Returns:
- destination recording id.
-
liveDestination
Destination for the live stream if merge is required. Default is null for no merge.- Parameters:
liveChannel- for the live stream merge- Returns:
- this for a fluent API.
-
liveDestination
Gets the destination for the live stream merge.- Returns:
- destination for live stream merge.
-
replicationChannel
Channel to use for replicating the recording, empty string will mean that the default channel is used.- Returns:
- channel to replicate the recording.
-
replicationChannel
Channel use to replicate the recording. Default is null which will use the context's default replication channel- Parameters:
replicationChannel- to use for replicating the recording.- Returns:
- this for a fluent API.
-
channelTagId
The channel used by the archive's subscription for replication will have the supplied channel tag applied to it. The default value for channelTagId isAeron.NULL_VALUE- Parameters:
channelTagId- tag to apply to the archive's subscription.- Returns:
- this for a fluent API
-
channelTagId
public long channelTagId()Gets channel tag id for the archive subscription.- Returns:
- channel tag id.
-
subscriptionTagId
The channel used by the archive's subscription for replication will have the supplied subscription tag applied to it. The default value for subscriptionTagId isAeron.NULL_VALUE- Parameters:
subscriptionTagId- tag to apply to the archive's subscription.- Returns:
- this for a fluent API
-
subscriptionTagId
public long subscriptionTagId()Gets subscription tag id for the archive subscription.- Returns:
- subscription tag id.
-
fileIoMaxLength
The maximum size of a file operation when reading from the archive to execute the replication. Will use the value defined in the context otherwise. This can be used reduce the size of file IO operations to lower the priority of some replays. Setting it to a value larger than the context value will have no affect.- Parameters:
fileIoMaxLength- maximum length of a file I/O operation.- Returns:
- this for a fluent API
-
fileIoMaxLength
public int fileIoMaxLength()Gets the maximum length for file IO operations in the replay. Defaults toAeron.NULL_VALUEif not set, which will trigger the use of the Archive.Context default.- Returns:
- maximum length of a file I/O operation.
-
replicationSessionId
Sets the session-id to be used for the replicated file instead of the session id from the source archive. This is useful in cases where we are replicating the same recording in multiple stages.- Parameters:
replicationSessionId- the session-id to be set for the received recording.- Returns:
- this for fluent API
-
replicationSessionId
public int replicationSessionId()The session-id to be used for the replicated recording.- Returns:
- session-id to be useful for the replicated recording.
-
encodedCredentials
Sets the encoded credentials that will be passed to the source archive for authentication. Currently only simple authentication (i.e. not challenge/response) is supported for replication.- Parameters:
encodedCredentials- credentials to be passed to the source archive.- Returns:
- this for a fluent API.
-
encodedCredentials
public byte[] encodedCredentials()Gets the encoded credentials that will be used to authenticate against the source archive.- Returns:
- encoded credentials used for authentication.
-
srcResponseChannel
Control address of the source archive to use response channels during replication.- Parameters:
responseChannel- control address of the response publication for the source archive.- Returns:
- this for a fluent API.
-
srcResponseChannel
Control address of the source archive to use response channels during replication.- Returns:
- control address of the response publication for the source archive.
-
equals
-
hashCode
public int hashCode() -
toString
-