public class JvmLifeSupport extends Object
Modifier and Type | Field and Description |
---|---|
private java.util.concurrent.atomic.AtomicInteger |
keepAliveCount
number of objects exported with keepAlive == true
|
private Thread |
keeper
thread to keep VM alive while keepAliveCount > 0
|
private java.util.concurrent.locks.Lock |
rl |
private java.util.concurrent.locks.ReadWriteLock |
rwl
lock guarding keepAliveCount and keeper
|
private java.util.concurrent.locks.Lock |
wl |
Constructor and Description |
---|
JvmLifeSupport() |
Modifier and Type | Method and Description |
---|---|
private void |
check() |
(package private) void |
decrementKeepAliveCount()
Decrements the count of objects exported with keepAlive true,
stopping the non-daemon thread if decremented to zero.
|
(package private) void |
incrementKeepAliveCount()
Increments the count of objects exported with keepAlive true,
starting a non-daemon thread if necessary.
|
private final java.util.concurrent.locks.ReadWriteLock rwl
private final java.util.concurrent.locks.Lock rl
private final java.util.concurrent.locks.Lock wl
private final java.util.concurrent.atomic.AtomicInteger keepAliveCount
private volatile Thread keeper
void incrementKeepAliveCount()
void decrementKeepAliveCount()
private void check()
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.