public class CachingPolicy
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
HANDLER_CLASS_NAME_LRU |
Constructor and Description |
---|
CachingPolicy()
Creates a default caching policy instance, whose caching handler is oracle.spatial.network.lod.LRUCachingHandler, and the maximum number of nodes allowed in the cache is 500000.
|
CachingPolicy(CachingPolicy policy)
Copy constructor
|
CachingPolicy(org.w3c.dom.Element elem)
Constructs a caching policy instance according to the configuration specified in the xml element.
|
CachingPolicy(java.lang.String cachingHandlerClassName, int maxNodes)
Constructs a caching policy instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addResidentPartition(int partitionId)
Adds a resident partition to the caching policy.
|
java.lang.Object |
clone()
Supports clone().
|
CachingHandler |
getCachingHandler()
Returns the caching handler object.
|
int |
getMaxNumberOfNodes()
Returns the maximum number of nodes allowed in the cache for this network level.
|
int[] |
getResidentPartitionArray()
Returns the resident partition ID array.
|
java.util.HashSet<java.lang.Integer> |
getResidentPartitions()
Returns the resident partition IDs.
|
boolean |
isResidentPartition(int partitionId)
Checks whether the specified partition is a resident partition.
|
void |
setCachingHandler(CachingHandler cachingHander)
Sets the caching handler.
|
void |
setCachingHandler(java.lang.String cachingHandlerClassName)
Sets the caching handler.
|
void |
setMaxNumberOfNodes(int maxNumberOfNodes)
Sets the maximum number of nodes allowed in the cache for this network level.
|
public static final java.lang.String HANDLER_CLASS_NAME_LRU
public CachingPolicy()
public CachingPolicy(java.lang.String cachingHandlerClassName, int maxNodes)
cachingHandlerClassName
- caching handler class namemaxNodes
- maximum number of nodes allowed in the cache before some partitions must be flushed outpublic CachingPolicy(CachingPolicy policy)
policy
- caching policypublic CachingPolicy(org.w3c.dom.Element elem) throws LODConfigException
elem
- xml element containing the caching policy configurationLODConfigException
public void setCachingHandler(java.lang.String cachingHandlerClassName)
cachingHandlerClassName
- full class name, including the package names, of the caching handlerpublic void setCachingHandler(CachingHandler cachingHander)
cachingHander
- caching handlerpublic CachingHandler getCachingHandler()
public boolean isResidentPartition(int partitionId)
partitionId
- partition IDpublic int getMaxNumberOfNodes()
public void setMaxNumberOfNodes(int maxNumberOfNodes)
maxNumberOfNodes
-public java.util.HashSet<java.lang.Integer> getResidentPartitions()
public int[] getResidentPartitionArray()
public void addResidentPartition(int partitionId)
partitionId
- ID of the resident partitionpublic java.lang.Object clone()
clone
in class java.lang.Object