private class SimpleRpcServer.ConnectionManager extends Object
Modifier and Type | Field and Description |
---|---|
private Set<SimpleServerRpcConnection> |
connections |
private AtomicInteger |
count |
private int |
idleScanInterval |
private int |
idleScanThreshold |
private Timer |
idleScanTimer |
private int |
maxIdleTime |
private int |
maxIdleToClose |
Constructor and Description |
---|
ConnectionManager() |
Modifier and Type | Method and Description |
---|---|
private boolean |
add(SimpleServerRpcConnection connection) |
(package private) boolean |
close(SimpleServerRpcConnection connection) |
(package private) void |
closeAll() |
(package private) void |
closeIdle(boolean scanAll) |
(package private) SimpleServerRpcConnection |
register(SocketChannel channel) |
private boolean |
remove(SimpleServerRpcConnection connection) |
private void |
scheduleIdleScanTask() |
(package private) int |
size() |
(package private) void |
startIdleScan() |
(package private) void |
stopIdleScan() |
(package private) SimpleServerRpcConnection[] |
toArray() |
private final AtomicInteger count
private final Set<SimpleServerRpcConnection> connections
private final Timer idleScanTimer
private final int idleScanThreshold
private final int idleScanInterval
private final int maxIdleTime
private final int maxIdleToClose
ConnectionManager()
private boolean add(SimpleServerRpcConnection connection)
private boolean remove(SimpleServerRpcConnection connection)
int size()
SimpleServerRpcConnection[] toArray()
SimpleServerRpcConnection register(SocketChannel channel)
boolean close(SimpleServerRpcConnection connection)
void closeIdle(boolean scanAll)
void closeAll()
void startIdleScan()
void stopIdleScan()
private void scheduleIdleScanTask()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.