Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.ifs.common
Class LooselyBoundedCache

    java.lang.Object
      oracle.ifs.common.Cache
          oracle.ifs.common.BoundedCache
              oracle.ifs.common.LooselyBoundedCache

Direct Known Subclasses:
  TieLooselyBoundedCache

    public class LooselyBoundedCache

extends BoundedCache

An LooselyBoundedCache is a cache that is bounded to hold a limited number of items. The upper bound is maintained by an efficient but non-exact algorithm that removes LRU entries.

(Published)

Field Summary
`protected long` | `m_AccessSequence` The access sequence.
`protected int` | `m_CacheCountEstimate` The estimate of the current cache count
`protected int` | `m_Capacity` Target max hashtable capacity; alos used as initial Capacity in hashtable constructor
`protected int` | `m_EmergencyCapacityTrigger` capacity at which an "emergency" purge is performed
`protected boolean` | `m_EmergencyPurgeRequested` Emergency cache purge requested
`protected long` | `m_HitCount` The number of cache hits.
`protected java.util.concurrent.ConcurrentHashMap` | `m_Items` The cache items.
`protected long` | `m_LockCount` The number of locked cache puts.
`protected long` | `m_MissCount` The number of cache misses.
`protected int` | `m_NormalCapacityTrigger` capacity at which a "normal" purge is posted
`protected boolean` | `m_NormalPurgeRequested` Normal cache purge requested
`protected long` | `m_PurgeCount` The number of cache removes.
`protected int` | `m_PurgeCycleCount` Total number of purge cycles performed
`protected long` | `m_PurgeCycleTime` Total elapsed time (in ms) of the purge cycles performed.
`protected boolean` | `m_PurgeInProgress` Cache purge in progress
`protected int` | `m_PurgeTarget` Number of items desired in the cache after a purge operation
`protected long` | `m_PutCount` The number of cache puts.
`protected long` | `m_RemoveCount` The number of cache removes.
`protected long` | `m_SequenceAtPreviousPurge` Cache purge in progress
`protected int` | `m_UrgentCapacityTrigger` capacity at which an "urgent" purge is posted
`protected boolean` | `m_UrgentPurgeRequested` Urgent cache purge requested

Fields inherited from class oracle.ifs.common.Cache
`m_Configuration`

Constructor Summary
`LooselyBoundedCache(BoundedCacheConfiguration configuration)` Constructs an loosely bounded cache.

Method Summary
`protected void` | `addEntry(java.lang.Object id, LooselyBoundedCacheable value, long seq)`
`protected void` | `addLockedEntry(java.lang.Object id, LooselyBoundedCacheable value)`
`protected void` | `checkIfPurgeNeeded()`
`void` | `dispose()` Disposes this cache.
`java.lang.Object` | `find(java.lang.Object id)` Gets an item from this cache.
`CachePerformance` | `getCachePerformance()` Gets the performance information for this cache.
`java.util.Enumeration` | `getElements()` Gets an Enumeration of the LooselyBoundedCacheable objects in this cache.
`void` | `lock(java.lang.Object id, LooselyBoundedCacheable lbc)` Locks an item in this cache.
`void` | `lock(java.lang.Object id, java.lang.Object value)` Locks an item in this cache.
`void` | `performNormalPurgeIfNeeded()` Purge Cache if a request for "normal" purge is indicated
`void` | `performUrgentPurgeIfNeeded()` Purge Cache if a request for "urgent" purge is indicated
`protected void` | `purge()`
`protected void` | `purgeEntry(java.lang.Object id)` Purges an item from this cache.
`void` | `put(java.lang.Object id, LooselyBoundedCacheable lbc)` Puts an item in this cache.
`void` | `put(java.lang.Object id, java.lang.Object value)` Puts an item in this cache.
`void` | `remove(java.lang.Object id)` Removes an item from this cache.
`void` | `reset()` Resets this cache.
`void` | `resetCachePerformance()` Resets the performance information for this cache.
`void` | `setCacheConfiguration(CacheConfiguration configuration)` Alters the configuration of this cache.
`protected void` | `validateCacheConfiguration(CacheConfiguration configuration)` Validates cache configuration information.

Methods inherited from class oracle.ifs.common.Cache
`getCacheConfiguration`

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

Field Detail

### m_Items

    protected java.util.concurrent.ConcurrentHashMap m_Items

  Description copied from class: `LooselyBoundedCache`
  The cache items.

  (Unpublished)

### m_Capacity

    protected int m_Capacity

  Description copied from class: `LooselyBoundedCache`
  Target max hashtable capacity; alos used as initial Capacity in hashtable constructor

  (Unpublished)

### m_NormalCapacityTrigger

    protected int m_NormalCapacityTrigger

  Description copied from class: `LooselyBoundedCache`
  capacity at which a "normal" purge is posted

  (Unpublished)

### m_UrgentCapacityTrigger

    protected int m_UrgentCapacityTrigger

  Description copied from class: `LooselyBoundedCache`
  capacity at which an "urgent" purge is posted

  (Unpublished)

### m_EmergencyCapacityTrigger

    protected int m_EmergencyCapacityTrigger

  Description copied from class: `LooselyBoundedCache`
  capacity at which an "emergency" purge is performed

  (Unpublished)

### m_PurgeTarget

    protected int m_PurgeTarget

  Description copied from class: `LooselyBoundedCache`
  Number of items desired in the cache after a purge operation

  (Unpublished)

### m_AccessSequence

    protected long m_AccessSequence

  Description copied from class: `LooselyBoundedCache`
  The access sequence.

  (Unpublished)

### m_CacheCountEstimate

    protected int m_CacheCountEstimate

  Description copied from class: `LooselyBoundedCache`
  The estimate of the current cache count

  (Unpublished)

### m_SequenceAtPreviousPurge

    protected long m_SequenceAtPreviousPurge

  Description copied from class: `LooselyBoundedCache`
  Cache purge in progress

  (Unpublished)

### m_PurgeCycleCount

    protected int m_PurgeCycleCount

  Description copied from class: `LooselyBoundedCache`
  Total number of purge cycles performed

  (Unpublished)

### m_PurgeCycleTime

    protected long m_PurgeCycleTime

  Description copied from class: `LooselyBoundedCache`
  Total elapsed time (in ms) of the purge cycles performed. Used to calculate an average purge cycle time.

  (Unpublished)

### m_PurgeInProgress

    protected boolean m_PurgeInProgress

  Description copied from class: `LooselyBoundedCache`
  Cache purge in progress

  (Unpublished)

### m_NormalPurgeRequested

    protected boolean m_NormalPurgeRequested

  Description copied from class: `LooselyBoundedCache`
  Normal cache purge requested

  (Unpublished)

### m_UrgentPurgeRequested

    protected boolean m_UrgentPurgeRequested

  Description copied from class: `LooselyBoundedCache`
  Urgent cache purge requested

  (Unpublished)

### m_EmergencyPurgeRequested

    protected boolean m_EmergencyPurgeRequested

  Description copied from class: `LooselyBoundedCache`
  Emergency cache purge requested

  (Unpublished)

### m_HitCount

    protected long m_HitCount

  Description copied from class: `LooselyBoundedCache`
  The number of cache hits.

  (Unpublished)

### m_MissCount

    protected long m_MissCount

  Description copied from class: `LooselyBoundedCache`
  The number of cache misses.

  (Unpublished)

### m_PutCount

    protected long m_PutCount

  Description copied from class: `LooselyBoundedCache`
  The number of cache puts.

  (Unpublished)

### m_LockCount

    protected long m_LockCount

  Description copied from class: `LooselyBoundedCache`
  The number of locked cache puts.

  (Unpublished)

### m_RemoveCount

    protected long m_RemoveCount

  Description copied from class: `LooselyBoundedCache`
  The number of cache removes.

  (Unpublished)

### m_PurgeCount

    protected long m_PurgeCount

  Description copied from class: `LooselyBoundedCache`
  The number of cache removes.

  (Unpublished)

Constructor Detail

### LooselyBoundedCache

    public LooselyBoundedCache(BoundedCacheConfiguration configuration)
                        throws IfsException

  Constructs an loosely bounded cache.

  Parameters:
    `configuration` - the configuration paramaters for the new cache
  Throws:
    `IfsException`
  (Unpublished)

Method Detail

### setCacheConfiguration

    public void setCacheConfiguration(CacheConfiguration configuration)
                               throws IfsException

  Description copied from class: `LooselyBoundedCache`
  Alters the configuration of this cache.

  The following cache configuration parameters can be changed using this method:

  - Capacity
  - Normal capacity trigger
  - Urgent capacity trigger
  - Emergency capacity trigger
  - Purge target

  All other cache configuration parameters specified in the CacheConfiguration are ignored.

  Specified by:
    `setCacheConfiguration` in class `Cache`
  Parameters:
    `configuration` - the configuration parameters; must be a BoundedCacheConfiguration
  Throws:
    `IfsException` - (IFS-10810) if the operation fails
  (Unpublished)

### put

    public void put(java.lang.Object id,
                    java.lang.Object value)
             throws IfsException

  Description copied from class: `LooselyBoundedCache`
  Puts an item in this cache.

  Specified by:
    `put` in class `Cache`
  Parameters:
    `id` - the item id
    `value` - the item
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### put

    public void put(java.lang.Object id,
                    LooselyBoundedCacheable lbc)
             throws IfsException

  Description copied from class: `LooselyBoundedCache`
  Puts an item in this cache.

  Parameters:
    `id` - the item id
    `lbc` - the item
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### lock

    public void lock(java.lang.Object id,
                     java.lang.Object value)
              throws IfsException

  Description copied from class: `LooselyBoundedCache`
  Locks an item in this cache.

  Specified by:
    `lock` in class `BoundedCache`
  Parameters:
    `id` - the item id
    `value` - the item
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### lock

    public void lock(java.lang.Object id,
                     LooselyBoundedCacheable lbc)
              throws IfsException

  Description copied from class: `LooselyBoundedCache`
  Locks an item in this cache.

  Parameters:
    `id` - the item id
    `lbc` - the item
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### remove

    public void remove(java.lang.Object id)
                throws IfsException

  Description copied from class: `LooselyBoundedCache`
  Removes an item from this cache.

  Specified by:
    `remove` in class `Cache`
  Parameters:
    `id` - the item id
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### purgeEntry

    protected void purgeEntry(java.lang.Object id)

  Description copied from class: `LooselyBoundedCache`
  Purges an item from this cache.

  Parameters:
    `id` - the item id
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### find

    public java.lang.Object find(java.lang.Object id)
                          throws IfsException

  Description copied from class: `LooselyBoundedCache`
  Gets an item from this cache.

  Specified by:
    `find` in class `Cache`
  Parameters:
    `id` - the item id
  Returns:
    the item, or null if the item is not in this cache
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### performNormalPurgeIfNeeded

    public void performNormalPurgeIfNeeded()

  Description copied from class: `LooselyBoundedCache`
  Purge Cache if a request for "normal" purge is indicated

  Specified by:
    `performNormalPurgeIfNeeded` in class `BoundedCache`
  (Unpublished)

### performUrgentPurgeIfNeeded

    public void performUrgentPurgeIfNeeded()

  Description copied from class: `LooselyBoundedCache`
  Purge Cache if a request for "urgent" purge is indicated

  Specified by:
    `performUrgentPurgeIfNeeded` in class `BoundedCache`
  (Unpublished)

### purge

    protected void purge()

### addEntry

    protected void addEntry(java.lang.Object id,
                            LooselyBoundedCacheable value,
                            long seq)

### getElements

    public java.util.Enumeration getElements()
                                      throws IfsException

  Description copied from class: `LooselyBoundedCache`
  Gets an Enumeration of the LooselyBoundedCacheable objects in this cache.

  Overrides:
    `getElements` in class `Cache`
  Returns:
    the enumeration of LooselyBoundedCacheable
  Throws:
    `IfsException` - if operation fails
  (Unpublished)

### addLockedEntry

    protected void addLockedEntry(java.lang.Object id,
                                  LooselyBoundedCacheable value)

### checkIfPurgeNeeded

    protected void checkIfPurgeNeeded()

### getCachePerformance

    public CachePerformance getCachePerformance()

  Description copied from class: `LooselyBoundedCache`
  Gets the performance information for this cache.

  Specified by:
    `getCachePerformance` in class `Cache`
  Returns:
    a cache performance object
  (Unpublished)

### resetCachePerformance

    public void resetCachePerformance()

  Description copied from class: `LooselyBoundedCache`
  Resets the performance information for this cache.

  Specified by:
    `resetCachePerformance` in class `Cache`
  (Unpublished)

### reset

    public void reset()

  Description copied from class: `LooselyBoundedCache`
  Resets this cache.

  This causes the cache to be emptied and its performance information to be reset.

  Overrides:
    `reset` in class `Cache`
  (Unpublished)

### dispose

    public void dispose()

  Description copied from class: `LooselyBoundedCache`
  Disposes this cache.

  After the cache is disposed, it is invalid to use this cache.

  Overrides:
    `dispose` in class `Cache`
  (Unpublished)

### validateCacheConfiguration

    protected void validateCacheConfiguration(CacheConfiguration configuration)
                                       throws IfsException

  Description copied from class: `LooselyBoundedCache`
  Validates cache configuration information.

  Checks purge target, normal capacity trigger, urgent capacity trigger, and emergency capacity trigger.

  Parameters:
    `configuration` - the configuration paramaters for the new cache
  Throws:
    `IfsException` - if the configuration is not valid
  (Unpublished)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD