Skip navigation links

Oracle® Spatial Java API Reference
11g Release 1 (11.1)

B28401-02


oracle.spatial.network.lod.config
Class CachingPolicy

java.lang.Object
  extended by oracle.spatial.network.lod.config.CachingPolicy

All Implemented Interfaces:
java.lang.Cloneable

public class CachingPolicy
extends java.lang.Object
implements java.lang.Cloneable

The caching policy for a network at certain link level.

Since:
11gR1

Field Summary
static java.lang.String HANDLER_CLASS_NAME_LRU
           

 

Constructor Summary
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.

 

Method Summary
 void addResidentPartition(int partitionId)
          Adds a resident partition to the caching policy.
 java.lang.Object clone()
          Supports clone().
 CachingHandler getCachingHandler()
          Retruns 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.

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

HANDLER_CLASS_NAME_LRU

public static final java.lang.String HANDLER_CLASS_NAME_LRU
See Also:
Constant Field Values

Constructor Detail

CachingPolicy

public 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

public CachingPolicy(java.lang.String cachingHandlerClassName,
                     int maxNodes)
Constructs a caching policy instance.
Parameters:
cachingHandlerClassName - chaching handler class name
maxNodes - maximum number of nodes allowed in the cache before some partitions must be flushed out

CachingPolicy

public CachingPolicy(CachingPolicy policy)
Copy constructor
Parameters:
policy - caching policy

CachingPolicy

public CachingPolicy(org.w3c.dom.Element elem)
              throws LODConfigException
Constructs a caching policy instance according to the configuration specified in the xml element.
Parameters:
elem - xml element containing the caching policy configuration
Throws:
LODConfigException

Method Detail

setCachingHandler

public void setCachingHandler(java.lang.String cachingHandlerClassName)
Sets the caching handler.
Parameters:
cachingHandlerClassName - full class name, including the package names, of the caching handler

setCachingHandler

public void setCachingHandler(CachingHandler cachingHander)
Sets the caching handler.
Parameters:
cachingHander - caching handler

getCachingHandler

public CachingHandler getCachingHandler()
Retruns the caching handler object.
Returns:
caching handler

isResidentPartition

public boolean isResidentPartition(int partitionId)
Checks whether the specified partition is a resident partition. A resident partition is a partition that never gets flushed out of the cache once loaded.
Parameters:
partitionId - partition ID
Returns:
true, if the partition if a resident partition; flase, otherwise.

getMaxNumberOfNodes

public int getMaxNumberOfNodes()
Returns the maximum number of nodes allowed in the cache for this network level. Some partitions will be flushed out of the cache when the number of nodes in the cache exceeds the maximum allowed number of nodes.
Returns:
the maximum number of nodes allowed in the cache

setMaxNumberOfNodes

public void setMaxNumberOfNodes(int maxNumberOfNodes)
Sets the maximum number of nodes allowed in the cache for this network level.
Parameters:
maxNumberOfNodes -

getResidentPartitions

public java.util.HashSet<java.lang.Integer> getResidentPartitions()
Returns the resident partition IDs.
Returns:
resident partition IDs

getResidentPartitionArray

public int[] getResidentPartitionArray()
Returns the resident partition ID array.
Returns:
resident partition IDs

addResidentPartition

public void addResidentPartition(int partitionId)
Adds a resident partition to the caching policy.
Parameters:
partitionId - ID of the resident partition

clone

public java.lang.Object clone()
Supports clone().
Overrides:
clone in class java.lang.Object
Returns:
a copy of this caching policy.

Skip navigation links

Oracle® Spatial Java API Reference
11g Release 1 (11.1)

B28401-02


Copyright © 2007, 2008, Oracle. All Rights Reserved.