use of com.hazelcast.nio.ConnectionListener in project hazelcast by hazelcast.
the class MockConnectionManager method registerConnection.
@Override
public boolean registerConnection(final Address remoteEndpoint, final Connection connection) {
mapConnections.put(remoteEndpoint, connection);
ioService.getEventService().executeEventCallback(new StripedRunnable() {
@Override
public void run() {
for (ConnectionListener listener : connectionListeners) {
listener.connectionAdded(connection);
}
}
@Override
public int getKey() {
return remoteEndpoint.hashCode();
}
});
return true;
}
Aggregations