public final class DriverProxy extends Object
For writing commands into the client conductor buffer.
Note: this class is not thread safe and is expecting to be called within Aeron.Context.clientLock().
| Constructor and Description |
|---|
DriverProxy(RingBuffer toDriverCommandBuffer,
long clientId)
Create a proxy to a media driver which sends commands via a
RingBuffer. |
| Modifier and Type | Method and Description |
|---|---|
long |
addCounter(int typeId,
DirectBuffer keyBuffer,
int keyOffset,
int keyLength,
DirectBuffer labelBuffer,
int labelOffset,
int labelLength)
Add a new counter with a type id plus the label and key are provided in buffers.
|
long |
addCounter(int typeId,
String label)
Add a new counter with a type id and label, the key will be blank.
|
long |
addDestination(long registrationId,
String endpointChannel)
Add a destination to the send channel of an existing MDC Publication.
|
long |
addExclusivePublication(String channel,
int streamId)
Instruct the driver to add a non-concurrent, i.e.
|
long |
addPublication(String channel,
int streamId)
Instruct the driver to add a concurrent publication.
|
long |
addRcvDestination(long registrationId,
String endpointChannel)
Add a destination to the receive channel endpoint of an existing MDS Subscription.
|
long |
addSubscription(String channel,
int streamId)
Instruct the driver to add a subscription.
|
void |
clientClose()
Notify the media driver that this client is closing.
|
long |
removeCounter(long registrationId)
Instruct the media driver to remove an existing counter by its registration id.
|
long |
removeDestination(long registrationId,
String endpointChannel)
Remove a destination from the send channel of an existing MDC Publication.
|
long |
removePublication(long registrationId)
Instruct the driver to remove a publication by its registration id.
|
long |
removeRcvDestination(long registrationId,
String endpointChannel)
Remove a destination from the receive channel endpoint of an existing MDS Subscription.
|
long |
removeSubscription(long registrationId)
Instruct the driver to remove a subscription by its registration id.
|
boolean |
terminateDriver(DirectBuffer tokenBuffer,
int tokenOffset,
int tokenLength)
Instruct the media driver to terminate.
|
long |
timeOfLastDriverKeepaliveMs()
Time of the last heartbeat to indicate the driver is alive.
|
String |
toString() |
public DriverProxy(RingBuffer toDriverCommandBuffer, long clientId)
RingBuffer.toDriverCommandBuffer - to send commands via.clientId - to represent the client.public long timeOfLastDriverKeepaliveMs()
public long addPublication(String channel, int streamId)
channel - uri in string format.streamId - within the channel.public long addExclusivePublication(String channel, int streamId)
channel - uri in string format.streamId - within the channel.public long removePublication(long registrationId)
registrationId - for the publication to be removed.public long addSubscription(String channel, int streamId)
channel - uri in string format.streamId - within the channel.public long removeSubscription(long registrationId)
registrationId - for the subscription to be removed.public long addDestination(long registrationId,
String endpointChannel)
registrationId - of the Publication.endpointChannel - for the destination.public long removeDestination(long registrationId,
String endpointChannel)
registrationId - of the Publication.endpointChannel - used for the addDestination(long, String) command.public long addRcvDestination(long registrationId,
String endpointChannel)
registrationId - of the Subscription.endpointChannel - for the destination.public long removeRcvDestination(long registrationId,
String endpointChannel)
registrationId - of the Subscription.endpointChannel - used for the addRcvDestination(long, String) command.public long addCounter(int typeId,
DirectBuffer keyBuffer,
int keyOffset,
int keyLength,
DirectBuffer labelBuffer,
int labelOffset,
int labelLength)
typeId - for associating with the counter.keyBuffer - containing the metadata key.keyOffset - offset at which the key begins.keyLength - length in bytes for the key.labelBuffer - containing the label.labelOffset - offset at which the label begins.labelLength - length in bytes for the label.public long addCounter(int typeId,
String label)
typeId - for associating with the counter.label - that is human-readable for the counter.public long removeCounter(long registrationId)
registrationId - of counter to remove.public void clientClose()
public boolean terminateDriver(DirectBuffer tokenBuffer, int tokenOffset, int tokenLength)
tokenBuffer - containing the authentication token.tokenOffset - at which the token begins.tokenLength - in bytes.Copyright © 2014-2023 Real Logic Limited. All Rights Reserved.