public class LocalSocketAddressStatus extends Object
When the value is ChannelEndpointStatus.ACTIVE then the key value and label will be updated with the
socket address and port which is bound.
| Modifier and Type | Field and Description |
|---|---|
static int |
INITIAL_LENGTH
Initial length length for a key, this will be expanded later when bound.
|
static int |
LOCAL_SOCKET_ADDRESS_STATUS_TYPE_ID
Type of the counter used to track a local socket address and port.
|
| Constructor and Description |
|---|
LocalSocketAddressStatus() |
| Modifier and Type | Method and Description |
|---|---|
static AtomicCounter |
allocate(MutableDirectBuffer tempBuffer,
CountersManager countersManager,
long registrationId,
int channelStatusId,
String name,
int typeId)
Allocate a counter to represent a local socket address associated with a channel.
|
static String |
findAddress(CountersReader countersReader,
long channelStatus,
int channelStatusId)
Find the currently bound socket address for the channel.
|
static List<String> |
findAddresses(CountersReader countersReader,
long channelStatus,
int channelStatusId)
Find the list of currently bound local sockets.
|
static void |
updateBindAddress(AtomicCounter counter,
String bindAddressAndPort,
UnsafeBuffer countersMetadataBuffer)
Update the key metadata and label to contain the bound socket address once the transport is active.
|
public static final int INITIAL_LENGTH
public static final int LOCAL_SOCKET_ADDRESS_STATUS_TYPE_ID
public static AtomicCounter allocate(MutableDirectBuffer tempBuffer, CountersManager countersManager, long registrationId, int channelStatusId, String name, int typeId)
tempBuffer - for building up the key and label.countersManager - which will allocate the counter.registrationId - of the action the counter is associated with.channelStatusId - with which the new counter is associated.name - for the counter to put in the label.typeId - to categorise the counter.public static void updateBindAddress(AtomicCounter counter, String bindAddressAndPort, UnsafeBuffer countersMetadataBuffer)
counter - representing the local socket address of the transport.bindAddressAndPort - in string representation.countersMetadataBuffer - to be updated for the bound address.public static List<String> findAddresses(CountersReader countersReader, long channelStatus, int channelStatusId)
countersReader - for the connected driver.channelStatus - value for the channel which aggregates the transports.channelStatusId - identity of the counter for the channel which aggregates the transports.public static String findAddress(CountersReader countersReader, long channelStatus, int channelStatusId)
countersReader - for the connected driver.channelStatus - value for the channel which aggregates the transports.channelStatusId - identity of the counter for the channel which aggregates the transports.Copyright © 2014-2020 Real Logic Limited. All Rights Reserved.