Package net.sf.ehcache.pool
Class SizeOfEngineLoader
- java.lang.Object
-
- net.sf.ehcache.pool.SizeOfEngineLoader
-
- All Implemented Interfaces:
SizeOfEngineFactory
public final class SizeOfEngineLoader extends java.lang.Object implements SizeOfEngineFactory
- Author:
- Alex Snaps
-
-
Field Summary
Fields Modifier and Type Field Description static SizeOfEngineLoaderINSTANCEThe one and single instance of this class
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SizeOfEnginecreateSizeOfEngine(int maxObjectCount, boolean abort, boolean silent)Creates a new instance of a SizeOfEnginebooleanload(java.lang.Class<? extends SizeOfEngineFactory> clazz, boolean reload)Tries to find a SizeOfEngineFactory instance that is assignable from clazzstatic SizeOfEnginenewSizeOfEngine(int maxObjectCount, boolean abort, boolean silent)Creates a new instance of a SizeOfEnginevoidreload()Reloads the factory using the ServiceLoader
-
-
-
Field Detail
-
INSTANCE
public static final SizeOfEngineLoader INSTANCE
The one and single instance of this class
-
-
Method Detail
-
newSizeOfEngine
public static SizeOfEngine newSizeOfEngine(int maxObjectCount, boolean abort, boolean silent)
Creates a new instance of a SizeOfEngine- Parameters:
maxObjectCount- the max object graph that will be traversed.abort- true if the object traversal should be aborted when the max depth is exceededsilent- true if no info log explaining which agent was chosen should be printed- Returns:
- the new instance
-
createSizeOfEngine
public SizeOfEngine createSizeOfEngine(int maxObjectCount, boolean abort, boolean silent)
Creates a new instance of a SizeOfEngine- Specified by:
createSizeOfEnginein interfaceSizeOfEngineFactory- Parameters:
maxObjectCount- the max object graph that will be traversed.abort- true if the object traversal should be aborted when the max depth is exceededsilent- true if no info log explaining which agent was chosen should be printed- Returns:
- the new instance
-
reload
public void reload()
Reloads the factory using the ServiceLoader
-
load
public boolean load(java.lang.Class<? extends SizeOfEngineFactory> clazz, boolean reload)
Tries to find a SizeOfEngineFactory instance that is assignable from clazz- Parameters:
clazz- the classreload- whether to force a reload of the ServiceLoader- Returns:
- true if succeeded otherwise, false
-
-