|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinfo.sswap.impl.empire.io.ClosureBuilderFactory
public class ClosureBuilderFactory
Creates a ClosureBuilder and specifies the default parameters (if not provided by the caller)
Field Summary | |
---|---|
private java.util.List<java.lang.String> |
ignoredNamespaces
Namespaces for which closure will not be computed. |
private long |
maxBytes
The byte limit for the generated closure builder. |
private int |
maxThreads
The number of concurrent threads used to compute the closure. |
private long |
maxTime
The time limit for the generated closure builder. |
private static ModelCache |
MODEL_CACHE
The default model cache shared by all builders, unless overridden for a specific builder. |
private ModelCache |
modelCache
The model cache that will be used by the builder -- by default, MODEL_CACHE is used, unless overridden via setModelCache(ModelCache) method. |
Constructor Summary | |
---|---|
private |
ClosureBuilderFactory()
A private constructor |
Method Summary | |
---|---|
ClosureBuilderFactory |
addIgnoredNamespace(java.lang.String ns)
Adds a new namespace to the ignore list for which closure will not be computed. |
static ModelCache |
getDefaultModelCache()
Gets the default model cache that is shared by all closure-builders (unless it is specifically overridden). |
long |
getMaxBytes()
Gets the current byte limit |
int |
getMaxThreads()
Gets the number of concurrent threads that will build the closure |
long |
getMaxTime()
Gets the current time limit. |
ModelCache |
getModelCache()
Gets the model cache that will be used by the ClosureBuilders |
ClosureBuilder |
newBuilder()
Creates a ClosureBuilder with the currently set parameters |
static ClosureBuilderFactory |
newInstance()
Creates a new ClosureBuilderFactory |
ClosureBuilderFactory |
setMaxBytes(long maxBytes)
Sets the current byte limit. |
ClosureBuilderFactory |
setMaxThreads(int maxThreads)
Sets the number of concurrent threads that will build the closure |
ClosureBuilderFactory |
setMaxTime(long maxTime)
Sets the new time limit (in milliseconds) |
void |
setModelCache(ModelCache modelCache)
Sets a new model cache that will be used by ClosureBuilders |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final ModelCache MODEL_CACHE
private long maxBytes
private long maxTime
private int maxThreads
private ModelCache modelCache
private final java.util.List<java.lang.String> ignoredNamespaces
Constructor Detail |
---|
private ClosureBuilderFactory()
Method Detail |
---|
public static ClosureBuilderFactory newInstance()
public ClosureBuilder newBuilder()
public long getMaxBytes()
public ClosureBuilderFactory setMaxBytes(long maxBytes)
maxBytes
- the new byte limit
public long getMaxTime()
public ClosureBuilderFactory setMaxTime(long maxTime)
maxTime
- the time limit (in milliseconds)
public int getMaxThreads()
public ClosureBuilderFactory setMaxThreads(int maxThreads)
maxThreads
- the number of concurrent threads
public ModelCache getModelCache()
public void setModelCache(ModelCache modelCache)
modelCache
- the modelCache to setpublic ClosureBuilderFactory addIgnoredNamespace(java.lang.String ns)
ns
- a new namespace
public static ModelCache getDefaultModelCache()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |