Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Real-Time Decisions
11g Release 1 (11.1.1)

E17787-02


com.sigmadynamics.sdo.support
Class SDEntityCache

java.lang.Object
  extended by com.sigmadynamics.sdo.support.SDOBase
      extended by com.sigmadynamics.sdo.base.SDO
          extended by com.sigmadynamics.sdo.support.SDEntityCache

All Implemented Interfaces:
SDOInterface, EntityCacheInterface
Direct Known Subclasses:
EntityCache

public abstract class SDEntityCache
extends SDO
implements EntityCacheInterface

Field Summary
protected  int entryLifeTime
          if non-positive, then entries don't individually expire
protected  long refreshPeriod
          non-positive means cache age is entry based

 

Fields inherited from class com.sigmadynamics.sdo.support.SDOBase
description, internalName, sdExternalName

 

Constructor Summary
SDEntityCache(int entryLifeTime, int maxSize, long refreshPeriod, HasLong currentTimeMillis)
           

 

Method Summary
 EntityDataInterface get(EntityInterface entity)
           
 int getCurrentSize()
           
 int getEntryLifeTime()
           
 long getGets()
          Return the number of times get() has been called.
 long getHits()
          Return the number of times get() has been called and returned an entry from the cache.
 java.util.Set<EntityInterface> getKeys()
          Returns a new set containing the cache's keys.
 int getMaxSize()
           
 long getMisses()
          Return the number of times get() has been called and failed to return an entry.
 long getPuts()
          Returns the number of times put() has been called.
 long getRefreshes()
          Return the number of times the cache was entirely cleared, either manually via a JMX operation, or automatically after the cache's refresh period expired.
 long getRefreshPeriod()
          Return the interval, in milliseconds, between refreshing the entire cache.
 long getRefreshTime()
           
protected  void initRefreshTime(long now)
          Called by subclass's PostLoadInit, which is called by class loader.
 void put(EntityDataInterface newEntityData)
           
protected  void reload()
           

 

Methods inherited from class com.sigmadynamics.sdo.support.SDOBase
getDescription, getSDOId, getSDOLabel, getSDOLabelOrId, setDescription, setSDOId, setSDOLabel

 

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

 

Methods inherited from interface com.sigmadynamics.sdo.interfaces.EntityCacheInterface
loadCache

 

Methods inherited from interface com.sigmadynamics.sdo.interfaces.client.SDOInterface
getDescription, getSDOId, getSDOLabel, getSDOLabelOrId

 

Field Detail

entryLifeTime

protected final int entryLifeTime
if non-positive, then entries don't individually expire

refreshPeriod

protected final long refreshPeriod
non-positive means cache age is entry based

Constructor Detail

SDEntityCache

public SDEntityCache(int entryLifeTime,
                     int maxSize,
                     long refreshPeriod,
                     HasLong currentTimeMillis)
Parameters:
entryLifeTime - lifetime of entry in seconds
maxSize - maximum number of entries allowed in the cache
refreshPeriod - lifetime of cache in milliseconds
Since:
3.0

Method Detail

initRefreshTime

protected void initRefreshTime(long now)
Called by subclass's PostLoadInit, which is called by class loader.
Parameters:
now -

reload

protected void reload()
Since:
1.0

get

public EntityDataInterface get(EntityInterface entity)
Specified by:
get in interface EntityCacheInterface
Since:
1.0

put

public void put(EntityDataInterface newEntityData)
Specified by:
put in interface EntityCacheInterface
Since:
1.0

getKeys

public java.util.Set<EntityInterface> getKeys()
Returns a new set containing the cache's keys.
Specified by:
getKeys in interface EntityCacheInterface

getRefreshTime

public long getRefreshTime()
Returns:
next scheduled refresh time (milliseconds)
Since:
3.0

getCurrentSize

public int getCurrentSize()
Since:
3.0

getEntryLifeTime

public int getEntryLifeTime()
Returns:
seconds. A non-positive value indicates that entries never expire.
Since:
3.0

getMaxSize

public int getMaxSize()
Since:
3.0

getRefreshPeriod

public long getRefreshPeriod()
Return the interval, in milliseconds, between refreshing the entire cache. If a non-positive value is returned that means the cache is never refreshed, rather each entry's lifetime is individually timed using the interval returned by getEntryLifeTime().
Since:
3.0

getGets

public long getGets()
Return the number of times get() has been called.
Since:
3.0

getHits

public long getHits()
Return the number of times get() has been called and returned an entry from the cache.
Since:
3.0

getMisses

public long getMisses()
Return the number of times get() has been called and failed to return an entry.
Since:
3.0

getPuts

public long getPuts()
Returns the number of times put() has been called.
Since:
3.0

getRefreshes

public long getRefreshes()
Return the number of times the cache was entirely cleared, either manually via a JMX operation, or automatically after the cache's refresh period expired.
Since:
11.1.1.5

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Real-Time Decisions
11g Release 1 (11.1.1)

E17787-02


Copyright © 2010, 2011, Oracle. All rights reserved.