ehcache

net.sf.ehcache.pool
Class SizeOfEngineLoader

java.lang.Object
  extended by net.sf.ehcache.pool.SizeOfEngineLoader
All Implemented Interfaces:
SizeOfEngineFactory

public final class SizeOfEngineLoader
extends Object
implements SizeOfEngineFactory

Author:
Alex Snaps

Field Summary
static SizeOfEngineLoader INSTANCE
          The one and single instance of this class
 
Method Summary
 SizeOfEngine createSizeOfEngine(int maxObjectCount, boolean abort, boolean silent)
          Creates a new instance of a SizeOfEngine
 boolean load(Class<? extends SizeOfEngineFactory> clazz, boolean reload)
          Tries to find a SizeOfEngineFactory instance that is assignable from clazz
static SizeOfEngine newSizeOfEngine(int maxObjectCount, boolean abort, boolean silent)
          Creates a new instance of a SizeOfEngine
 void reload()
          Reloads the factory using the ServiceLoader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 exceeded
silent - 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:
createSizeOfEngine in interface SizeOfEngineFactory
Parameters:
maxObjectCount - the max object graph that will be traversed.
abort - true if the object traversal should be aborted when the max depth is exceeded
silent - 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(Class<? extends SizeOfEngineFactory> clazz,
                    boolean reload)
Tries to find a SizeOfEngineFactory instance that is assignable from clazz

Parameters:
clazz - the class
reload - whether to force a reload of the ServiceLoader
Returns:
true if succeeded otherwise, false

ehcache

Copyright 2001-2014, Terracotta, Inc.