|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.crosswire.common.activate.Activator
public final class Activator
Manager for instances of Activatable. Activator should be used to manage all activate()ions and deactivate()ions so that it can keep a track of exactly what is active and what can be deactivated is save memory.
The GNU Lesser General Public License for details.
Field Summary | |
---|---|
private static Set<Activatable> |
activated
The list of things that we have activated |
private static Lock |
lock
The object we use to prevent others from |
Constructor Summary | |
---|---|
private |
Activator()
Prevent instantiation |
Method Summary | |
---|---|
static void |
activate(Activatable subject)
Check that a subject is activated and call activate() if not. |
static void |
deactivate(Activatable subject)
Deactivate an Activatable object. |
static void |
deactivateAll()
|
static void |
reduceMemoryUsage(Kill amount)
If we need to tighten things up a bit we can save memory with this |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static Set<Activatable> activated
private static Lock lock
Constructor Detail |
---|
private Activator()
Method Detail |
---|
public static void activate(Activatable subject)
subject
- The thing to activatepublic static void reduceMemoryUsage(Kill amount)
amount
- the amount by which to to reduce memorypublic static void deactivate(Activatable subject)
subject
- The thing to deactivatepublic static void deactivateAll()
|
Copyright ยจ 2003-2015 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |