Skip navigation links

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

E17787-01


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
Since:
1.0

Field Summary
protected  java.util.Map<EntityInterface,EntityDataInterface> cache
           
protected  int entryLifeTime
          if non-positive, then entries don't individually expire
protected  boolean invalid
           
protected  long refreshPeriod
          non-positive means cache age is entry based
protected  long refreshTime
          next scheduled refresh time (ms).

 

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()
           
 long getHits()
           
 int getMaxSize()
           
 long getMisses()
           
 long getPuts()
           
 long getRefreshPeriod()
           
 long getRefreshTime()
           
protected  boolean isValid()
           
 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

cache

protected final java.util.Map<EntityInterface,EntityDataInterface> cache

invalid

protected boolean invalid

entryLifeTime

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

refreshTime

protected long refreshTime
next scheduled refresh time (ms). -1 means not yet refreshed or scheduled. after app init, the generated cache code's postloadinit will set the refreshtime to now+refreshPeriod

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 - milliseconds
Since:
3.0

Method Detail

isValid

protected boolean isValid()
Since:
1.0

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

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()
Returns:
milliseconds. default value is 86400000, or 1 day. If a non-positive value is returned that means the refresh period is infinite. The cache is never refreshed as a whole.
Since:
3.0

getGets

public long getGets()
Since:
3.0

getHits

public long getHits()
Since:
3.0

getMisses

public long getMisses()
Since:
3.0

getPuts

public long getPuts()
Since:
3.0

Skip navigation links

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

E17787-01


Copyright © 2010, Oracle. All rights reserved.