|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.crosswire.common.activate.Activator
public 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 deactivate()d is save memory.
|
Distribution Licence: JSword is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. The License is available on the internet here, or by writing to: Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA The copyright to this program is held by it's authors. |
Licence| Field Summary | |
|---|---|
private static Set |
activated
The list of things that we have activated |
static int |
KILL_EVERYTHING
Try as hard as possible to conserve memory |
static int |
KILL_LEAST_USED
Reduce memory usage, but only where sensible |
static int |
KILL_ONLY_IF_TIGHT
Reduce memory usage, but only if we really need to |
private static Lock |
lock
The object we use to prevent others from |
| Constructor Summary | |
|---|---|
private |
Activator()
Prevent instansiation |
| 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 |
reduceMemoryUsage(int 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 |
|---|
public static final int KILL_EVERYTHING
public static final int KILL_LEAST_USED
public static final int KILL_ONLY_IF_TIGHT
private static Set 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(int amount)
public static void deactivate(Activatable subject)
subject - The thing to de-activate
|
Copyright ? 2003-2004 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||