Package oracle.spatial.network.lod
Class LRUCachingHandler
- java.lang.Object
-
- oracle.spatial.network.lod.LRUCachingHandler
-
- All Implemented Interfaces:
CachingHandler
public class LRUCachingHandler extends java.lang.Object implements CachingHandler
This class implements the Least Recently Used (LRU) caching handler.- Since:
- 11gR1
-
-
Constructor Summary
Constructors Constructor Description LRUCachingHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
Creates and returns a copy of this CachingHandler object.int[]
getPartitionsToFlushOut(java.util.Collection<java.lang.Integer> residentPartitions, int minNumNodesToFlushOut)
Returns the IDs of the partitions to be flushed out.void
updateRank(LogicalPartition partition)
Updates the rank of the partition in the cache.
-
-
-
Method Detail
-
getPartitionsToFlushOut
public int[] getPartitionsToFlushOut(java.util.Collection<java.lang.Integer> residentPartitions, int minNumNodesToFlushOut) throws LODNetworkException
Description copied from interface:CachingHandler
Returns the IDs of the partitions to be flushed out.- Specified by:
getPartitionsToFlushOut
in interfaceCachingHandler
- Parameters:
residentPartitions
- resident partitions, which are the partitions to be excluded from the returned list.- Returns:
- IDs of the partitions to be flushed out.
- Throws:
LODNetworkException
-
updateRank
public void updateRank(LogicalPartition partition)
Description copied from interface:CachingHandler
Updates the rank of the partition in the cache. The rank will be used to determine which partitions to be flushed out of the cache when getPartitionsToFlushOut() is called.- Specified by:
updateRank
in interfaceCachingHandler
- Parameters:
partition
- the partition object whose rank is to be updated
-
clone
public java.lang.Object clone()
Description copied from interface:CachingHandler
Creates and returns a copy of this CachingHandler object.- Specified by:
clone
in interfaceCachingHandler
- Overrides:
clone
in classjava.lang.Object
- Returns:
-
-