|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.dream.AbstractComponent
org.objectweb.dream.cache.CacheImpl
public class CacheImpl
This class defines a basic cache. A cached message is considered as
up-to-date as long as it has not been cached more than timeout
milliseconds.
timeout
can be changed using the
CacheAttributeController
controller.
Field Summary | |
---|---|
protected Message |
cachedMessage
The last cached message. |
protected GetTimeStamp |
getTimeStamp
The GetTimeStamp client interface. |
protected Pull |
inPull
The Pull client interface. |
protected long |
lastTimeStamp
The last time stamp. |
protected MessageManager |
messageManagerItf
The message manager client interface. |
protected long |
timeOut
The cache time out. |
Fields inherited from class org.objectweb.dream.AbstractComponent |
---|
bindingLogger, fcNeedAsyncStart, fcState, lifeCycleLogger, logger, weaveableC |
Fields inherited from interface org.objectweb.dream.Pull |
---|
IN_PULL_ITF_NAME, OUT_PULL_ITF_NAME |
Fields inherited from interface org.objectweb.fractal.api.control.LifeCycleController |
---|
STARTED, STOPPED |
Constructor Summary | |
---|---|
CacheImpl()
|
Method Summary | |
---|---|
void |
bindFc(String clientItfName,
Object serverItf)
|
long |
getTimeOut()
Returns the time out. |
String[] |
listFc()
|
Message |
pull()
|
void |
setTimeOut(long timeOut)
Sets the time out of the cache component. |
Methods inherited from class org.objectweb.dream.AbstractComponent |
---|
beforeFirstStart, bindFc, getFcNeedAsyncStart, getFcState, initComponent, lookupFc, prepareStopFc, setLogger, startFc, stopFc, unbindFc |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected long timeOut
protected MessageManager messageManagerItf
protected GetTimeStamp getTimeStamp
protected Pull inPull
protected Message cachedMessage
protected long lastTimeStamp
Constructor Detail |
---|
public CacheImpl()
Method Detail |
---|
public Message pull() throws PullException
pull
in interface Pull
PullException
Pull.pull()
public void setTimeOut(long timeOut)
CacheAttributeController
setTimeOut
in interface CacheAttributeController
timeOut
- the time out to set.CacheAttributeController.setTimeOut(long)
public long getTimeOut()
CacheAttributeController
getTimeOut
in interface CacheAttributeController
CacheAttributeController.getTimeOut()
public void bindFc(String clientItfName, Object serverItf) throws NoSuchInterfaceException, IllegalBindingException, IllegalLifeCycleException
bindFc
in interface BindingController
bindFc
in class AbstractComponent
NoSuchInterfaceException
IllegalBindingException
IllegalLifeCycleException
BindingController.bindFc(String,
Object)
public String[] listFc()
listFc
in interface BindingController
BindingController.listFc()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |