public class SizeOfPolicyConfiguration
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Class and Description |
---|---|
static class |
SizeOfPolicyConfiguration.MaxDepthExceededBehavior
Enum of the possible behaviors of the SizeOf engine when the max depth is exceeded
|
Modifier and Type | Field and Description |
---|---|
static SizeOfPolicyConfiguration.MaxDepthExceededBehavior |
DEFAULT_MAX_DEPTH_EXCEEDED_BEHAVIOR
Default max traversal depth exceeded behavior
|
static int |
DEFAULT_MAX_SIZEOF_DEPTH
Default max traversal depth
|
private int |
maxDepth |
private SizeOfPolicyConfiguration.MaxDepthExceededBehavior |
maxDepthExceededBehavior |
Constructor and Description |
---|
SizeOfPolicyConfiguration() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
int |
getMaxDepth()
Gets the maximum depth the SizeOf engine can normally traverse
|
SizeOfPolicyConfiguration.MaxDepthExceededBehavior |
getMaxDepthExceededBehavior()
Gets the behavior of the SizeOf engine when the max depth is reached
|
int |
hashCode() |
SizeOfPolicyConfiguration |
maxDepth(int maxDepth)
Builder method to set the maximum depth the SizeOf engine can normally traverse
|
SizeOfPolicyConfiguration |
maxDepthExceededBehavior(SizeOfPolicyConfiguration.MaxDepthExceededBehavior maxDepthExceededBehavior)
Builder method to set the behavior of the SizeOf engine when the max depth is reached
|
SizeOfPolicyConfiguration |
maxDepthExceededBehavior(java.lang.String maxDepthExceededBehavior)
Builder method to set the behavior of the SizeOf engine when the max depth is reached using a String object
|
static SizeOfPolicyConfiguration.MaxDepthExceededBehavior |
resolveBehavior(Ehcache cache)
Helper method which resolves the MaxDepthExceededBehavior of a cache, using the cache manager's one if none was configured
on the cache itself.
|
static int |
resolveMaxDepth(Ehcache cache)
Helper method which resolves the max depth of a cache, using the cache manager's one if none was configured
on the cache itself.
|
private static SizeOfPolicyConfiguration |
resolvePolicy(Configuration configuration,
CacheConfiguration cacheConfiguration) |
void |
setMaxDepth(int maxDepth)
Sets the maximum depth the SizeOf engine can normally traverse
|
void |
setMaxDepthExceededBehavior(java.lang.String maxDepthExceededBehavior)
Sets the behavior of the SizeOf engine when the max depth is reached
|
public static final int DEFAULT_MAX_SIZEOF_DEPTH
public static final SizeOfPolicyConfiguration.MaxDepthExceededBehavior DEFAULT_MAX_DEPTH_EXCEEDED_BEHAVIOR
private volatile int maxDepth
private volatile SizeOfPolicyConfiguration.MaxDepthExceededBehavior maxDepthExceededBehavior
public int getMaxDepth()
public void setMaxDepth(int maxDepth)
maxDepth
- the maximum depth the SizeOf engine can normally traversepublic SizeOfPolicyConfiguration maxDepth(int maxDepth)
maxDepth
- the maximum depth the SizeOf engine can normally traversepublic SizeOfPolicyConfiguration.MaxDepthExceededBehavior getMaxDepthExceededBehavior()
public void setMaxDepthExceededBehavior(java.lang.String maxDepthExceededBehavior)
maxDepthExceededBehavior
- the behavior of the SizeOf engine when the max depth is reachedpublic SizeOfPolicyConfiguration maxDepthExceededBehavior(SizeOfPolicyConfiguration.MaxDepthExceededBehavior maxDepthExceededBehavior)
maxDepthExceededBehavior
- the behavior of the SizeOf engine when the max depth is reachedpublic SizeOfPolicyConfiguration maxDepthExceededBehavior(java.lang.String maxDepthExceededBehavior)
maxDepthExceededBehavior
- the behavior of the SizeOf engine when the max depth is reachedpublic static int resolveMaxDepth(Ehcache cache)
cache
- the cache from which to resolve the max depthpublic static SizeOfPolicyConfiguration.MaxDepthExceededBehavior resolveBehavior(Ehcache cache)
cache
- the cache from which to resolve the MaxDepthExceededBehaviorprivate static SizeOfPolicyConfiguration resolvePolicy(Configuration configuration, CacheConfiguration cacheConfiguration)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object