Class LeveledNetworkCache


  • public class LeveledNetworkCache
    extends java.lang.Object
    An instance of this class contains the cache for all link levels of a network.
    Since:
    11gR1
    • Constructor Detail

      • LeveledNetworkCache

        protected LeveledNetworkCache​(CachingPolicy[] policies)
                               throws LODConfigException
        A LogicalNetworkCache must know the exact number of link levels and the caching policy for each link level when it is constructed.
        Parameters:
        policies - caching policies
        Throws:
        LODConfigException
      • LeveledNetworkCache

        protected LeveledNetworkCache​(oracle.spatial.network.lod.NetworkCache[] networkCaches)
    • Method Detail

      • getNumberOfLinkLevels

        public int getNumberOfLinkLevels()
      • getPartition

        protected LogicalPartition getPartition​(int partitionId,
                                                int linkLevel)
        Retrieves the network partition from the cache.
        Parameters:
        partitionId - partition ID
        linkLevel - link level
        Returns:
        partition
      • getPartitions

        public LongHashMap<LogicalPartition> getPartitions​(int linkLevel)
        Returns all the network partitions in the cache for the specified link level.
        Parameters:
        linkLevel - link level
        Returns:
      • getNodePartitionId

        protected int getNodePartitionId​(long nodeId,
                                         int linkLevel)
      • getLinkPartitionIds

        protected int[] getLinkPartitionIds​(long linkId,
                                            int linkLevel)
      • getNumberOfNodes

        protected int getNumberOfNodes​(int linkLevel)
      • getNumberOfNodesInMemory

        public int getNumberOfNodesInMemory​(int linkLevel)
        Return the number of nodes in memory for the specified link level.
        Parameters:
        linkLevel - link level
        Returns:
      • getNumberOfNodesInMemory

        protected int getNumberOfNodesInMemory()
        Return the total number of nodes in memory for all link levels.
        Returns:
      • getNumberOfPartitions

        public int getNumberOfPartitions​(int linkLevel)
        Returns the number of network partitions in the cache for the specified link level.
        Parameters:
        linkLevel - link level
        Returns:
      • getPartitionIds

        public int[] getPartitionIds​(int linkLevel)
      • isNetworkPartitioned

        protected boolean isNetworkPartitioned​(int linkLevel)
      • isNetworkPartitionedSet

        protected boolean isNetworkPartitionedSet​(int linkLevel)
      • setNetworkCache

        protected void setNetworkCache​(int linkLevel,
                                       oracle.spatial.network.lod.NetworkCache networkCache)
      • setNumberOfLinkLevels

        protected void setNumberOfLinkLevels​(int numLinkLevels)
      • setNodePartitionId

        protected void setNodePartitionId​(long nodeId,
                                          int partitionId,
                                          int linkLevel)
      • setNumberOfLinks

        protected void setNumberOfLinks​(int numberOfLinks,
                                        int linkLevel)
      • setNumberOfNodes

        protected void setNumberOfNodes​(int numberOfNodes,
                                        int linkLevel)
      • setPartitionIds

        protected void setPartitionIds​(int[] partitionIds,
                                       int linkLevel)
      • setIsNetworkPartitioned

        protected void setIsNetworkPartitioned​(boolean isNetworkPartitioned,
                                               int linkLevel)
      • flushPartition

        public void flushPartition​(int partitionId,
                                   int linkLevel)
        Removes the partition from the cache.
        Parameters:
        partitionId -
        linkLevel -
      • clear

        public void clear​(int linkLevel)
        Clears network cache for the specified link level.
        Parameters:
        linkLevel - link level
      • clear

        public void clear()
        Clears network cache for all link levels.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object