private final long maxMemoryBytes; private final int maxWaitMs; @GuardedBy("sync") private volatile long usedMemoryBytes;
private final Object sync = new Object(); private final int maxPercOfTotal; @GuardedBy("sync") private long allocatedBytes;
@GuardedBy("sync") private volatile long usedMemoryBytes; public GlobalMemoryManager(long maxBytes) {
private final HttpConnectionFactory<HttpRoute, ManagedHttpClientConnection> connFactory; @GuardedBy("this") private ManagedHttpClientConnection conn; @GuardedBy("this") private HttpRoute route; @GuardedBy("this") private Object state; @GuardedBy("this") private long updated; @GuardedBy("this") private long expiry; @GuardedBy("this") private boolean leased; @GuardedBy("this") private SocketConfig socketConfig; @GuardedBy("this") private ConnectionConfig connConfig;
private final HttpConnectionFactory<HttpRoute, ManagedHttpClientConnection> connFactory; @GuardedBy("this") private ManagedHttpClientConnection conn; @GuardedBy("this") private HttpRoute route; @GuardedBy("this") private Object state; @GuardedBy("this") private long updated; @GuardedBy("this") private long expiry; @GuardedBy("this") private boolean leased; @GuardedBy("this") private SocketConfig socketConfig; @GuardedBy("this") private ConnectionConfig connConfig;
private final HttpConnectionFactory<HttpRoute, ManagedHttpClientConnection> connFactory; @GuardedBy("this") private ManagedHttpClientConnection conn; @GuardedBy("this") private HttpRoute route; @GuardedBy("this") private Object state; @GuardedBy("this") private long updated; @GuardedBy("this") private long expiry; @GuardedBy("this") private boolean leased; @GuardedBy("this") private SocketConfig socketConfig; @GuardedBy("this") private ConnectionConfig connConfig;
private final HttpConnectionFactory<HttpRoute, ManagedHttpClientConnection> connFactory; @GuardedBy("this") private ManagedHttpClientConnection conn; @GuardedBy("this") private HttpRoute route; @GuardedBy("this") private Object state; @GuardedBy("this") private long updated; @GuardedBy("this") private long expiry; @GuardedBy("this") private boolean leased; @GuardedBy("this") private SocketConfig socketConfig; @GuardedBy("this") private ConnectionConfig connConfig;
private final SecureRandom rnd; @GuardedBy("this") private long count;