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(Function<OvsdbClient,Void> clientNotificationCallback) |
Modifier and Type | Method and Description |
---|---|
void |
clientDisconnected(OvsdbClient disconnectedClient)
Notify the service that the given client has disconnected.
|
void |
close() |
Map<OvsdbClient,Set<OvsdbClient>> |
getPendingClients() |
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.
|
void |
onInactiveClient(OvsdbClient disconnectedClient) |
public StalePassiveConnectionService(Function<OvsdbClient,Void> clientNotificationCallback)
public Map<OvsdbClient,Set<OvsdbClient>> getPendingClients()
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 onInactiveClient(OvsdbClient disconnectedClient)
public void close()
close
in interface AutoCloseable
Copyright © 2019 OpenDaylight. All rights reserved.