public class MemberViewUnifiedEndpointManager extends Object implements EndpointManager<TcpIpConnection>
| Modifier and Type | Method and Description |
|---|---|
void |
accept(Packet packet) |
void |
addConnectionListener(ConnectionListener listener)
Registers a ConnectionListener.
|
Collection<TcpIpConnection> |
getActiveConnections()
Returns all connections bind or not that are currently holding resources on this member.
|
TcpIpConnection |
getConnection(Address address)
Gets the connection for a given address.
|
Collection<TcpIpConnection> |
getConnections()
Returns connections that have been successfully established (ie.
|
NetworkStats |
getNetworkStats()
Returns network stats for inbound and outbound traffic.
|
TcpIpConnection |
getOrConnect(Address address)
Gets the existing connection for a given address or connects.
|
TcpIpConnection |
getOrConnect(Address address,
boolean silent)
Gets the existing connection for a given address.
|
boolean |
registerConnection(Address address,
TcpIpConnection connection)
Registers (ie.
|
String |
toString() |
boolean |
transmit(Packet packet,
Address target)
Transmits a packet to a certain address.
|
boolean |
transmit(Packet packet,
TcpIpConnection connection)
Transmits a packet to a certain connection.
|
public Collection<TcpIpConnection> getActiveConnections()
EndpointManagergetActiveConnections in interface EndpointManager<TcpIpConnection>public Collection<TcpIpConnection> getConnections()
EndpointManagergetConnections in interface EndpointManager<TcpIpConnection>public void addConnectionListener(ConnectionListener listener)
ConnectionListenableIf the same listener is registered multiple times, it will be notified multiple times.
addConnectionListener in interface ConnectionListenablelistener - the ConnectionListener to add.public TcpIpConnection getConnection(Address address)
EndpointManagergetConnection in interface EndpointManager<TcpIpConnection>address - the remote side of the connectionpublic TcpIpConnection getOrConnect(Address address)
EndpointManagergetOrConnect in interface EndpointManager<TcpIpConnection>address - the address to connect tonull if no connection existsEndpointManager.getOrConnect(Address, boolean)public TcpIpConnection getOrConnect(Address address, boolean silent)
EndpointManagernull.
When the connection is established at some point in time, it can be retrieved using the
EndpointManager.getConnection(Address).
getOrConnect in interface EndpointManager<TcpIpConnection>address - the address to connect tosilent - if logging should be done on debug level (silent=true) or on info level (silent=false)public boolean registerConnection(Address address, TcpIpConnection connection)
EndpointManagerEndpointManager.getConnection(Address) will return
the relevant Connection resource.registerConnection in interface EndpointManager<TcpIpConnection>address - - The remote endpoint to register the connection underconnection - - The connection to be registeredpublic boolean transmit(Packet packet, TcpIpConnection connection)
EndpointManager
If this method is called with a null connection, the call returns false.
transmit in interface EndpointManager<TcpIpConnection>packet - the packet to transmitconnection - he connection to where the Packet should be transmittedtrue if the transmit was a success, false if a failure (there is no guarantee that the packet is
actually going to be received since the packet perhaps is stuck in some buffer; it just means that it's buffered somewhere)public boolean transmit(Packet packet, Address target)
EndpointManagerIf the connection to the target doesn't exist yet, the system will try to make the connection. In this case true can be returned, even though the connection eventually can't be established.
transmit in interface EndpointManager<TcpIpConnection>packet - The Packet to transmit.target - The address of the target machine where the Packet should be transmitted.EndpointManager.transmit(Packet, Connection)public NetworkStats getNetworkStats()
EndpointManagergetNetworkStats in interface EndpointManager<TcpIpConnection>null if Advanced Networking is disabledCopyright © 2019 Hazelcast, Inc.. All rights reserved.