public class ConnectionTimer extends Object
Modifier and Type | Class and Description |
---|---|
private static class |
ConnectionTimer.TimeoutMap
Map for tracking idle connection timeouts.
|
Modifier and Type | Field and Description |
---|---|
private static Executor |
systemThreadPool |
private ConnectionTimer.TimeoutMap |
timeouts |
Constructor and Description |
---|
ConnectionTimer(long timeout)
Creates new ConnectionTimer which shuts down overdue connections after
the given timeout.
|
Modifier and Type | Method and Description |
---|---|
boolean |
cancelTimeout(TimedConnection conn)
Attempts to cancel timeout for the given connection.
|
void |
scheduleTimeout(TimedConnection conn,
boolean force)
Schedules timeout for given connection.
|
private static final Executor systemThreadPool
private final ConnectionTimer.TimeoutMap timeouts
public ConnectionTimer(long timeout)
public void scheduleTimeout(TimedConnection conn, boolean force)
public boolean cancelTimeout(TimedConnection conn)
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.