public class StalePassiveConnectionService extends Object implements AutoCloseable
When new connection arrives all connections from the same node are pinged. The pings cause the stale netty connections to close due to IOException. Those have not been closed after a timeout will be closed programmatically. New connection request handling is then proceeded after all stale connections are cleaned up in the OvsdbConnectionService
Constructor and Description |
---|
StalePassiveConnectionService(ScheduledExecutorService executorService) |
Modifier and Type | Method and Description |
---|---|
void |
clientDisconnected(OvsdbClient disconnectedClient)
Notify the service that the given client has disconnected.
|
void |
close() |
void |
handleNewPassiveConnection(OvsdbClient newOvsdbClient,
List<OvsdbClient> clientsFromSameNode)
This method makes sure that all stale connections from the same node are properly cleaned up before processing
new connection request.
|
public StalePassiveConnectionService(ScheduledExecutorService executorService)
public void handleNewPassiveConnection(OvsdbClient newOvsdbClient, List<OvsdbClient> clientsFromSameNode)
newOvsdbClient
- the connecting OvsdbClientclientsFromSameNode
- list of existing OvsdbClients from the same node as the new OvsdbClientpublic void clientDisconnected(OvsdbClient disconnectedClient)
disconnectedClient
- the client just disconnectedpublic void close()
close
in interface AutoCloseable
Copyright © 2018 OpenDaylight. All rights reserved.