com.uwyn.rife.engine
Class EngineContinuationConfigRuntime

java.lang.Object
  extended by com.uwyn.rife.continuations.ContinuationConfigRuntime<ElementSupport>
      extended by com.uwyn.rife.engine.EngineContinuationConfigRuntime

public class EngineContinuationConfigRuntime
extends ContinuationConfigRuntime<ElementSupport>


Field Summary
 
Fields inherited from class com.uwyn.rife.continuations.ContinuationConfigRuntime
DEFAULT_CONTINUATION_DURATION, DEFAULT_CONTINUATION_PURGE_FREQUENCY, DEFAULT_CONTINUATION_PURGE_SCALE
 
Method Summary
 boolean cloneContinuations(ElementSupport executingContinuable)
          Indicates whether a continuable should be cloned before resuming the execution.
 ElementSupport getAssociatedContinuableObject(Object executingInstance)
          Retrieves the ContinuableObject that corresponds to the currently executing object instance.
 long getContinuationDuration()
          The duration, in milliseconds, by which a continuation stays valid.
 ContinuationManager getContinuationManager(ElementSupport executingContinuable)
          Retrieves the manager that is responsible for the ContinuableObject that is currently executing.
 int getContinuationPurgeFrequency()
          The frequency by which the continuations purging will run in the ContinuationManager.
 int getContinuationPurgeScale()
          The scale that will be used to determine how often continuations purging will run in the ContinuationManager.
 
Methods inherited from class com.uwyn.rife.continuations.ContinuationConfigRuntime
getActiveConfigRuntime, setActiveConfigRuntime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAssociatedContinuableObject

public ElementSupport getAssociatedContinuableObject(Object executingInstance)
Description copied from class: ContinuationConfigRuntime
Retrieves the ContinuableObject that corresponds to the currently executing object instance.

If you don't work with a seperate continuable support class (see here) and don't allow people to just implement a marker interface without having to extend a base class, the associated continuable object is the same as the executing instance.

However, if there is a separate continuable support class, you'll need to return the appropriate continuable object here.

Specified by:
getAssociatedContinuableObject in class ContinuationConfigRuntime<ElementSupport>
Parameters:
executingInstance - the currently executing object instance
Returns:
the executing ContinuableObject
See Also:
ContinuationConfigInstrument.getContinuableSupportClassName()

getContinuationManager

public ContinuationManager getContinuationManager(ElementSupport executingContinuable)
Description copied from class: ContinuationConfigRuntime
Retrieves the manager that is responsible for the ContinuableObject that is currently executing.

Specified by:
getContinuationManager in class ContinuationConfigRuntime<ElementSupport>
Parameters:
executingContinuable - the currently executing continuable
Returns:
the corresponding manager

cloneContinuations

public boolean cloneContinuations(ElementSupport executingContinuable)
Description copied from class: ContinuationConfigRuntime
Indicates whether a continuable should be cloned before resuming the execution.

Specified by:
cloneContinuations in class ContinuationConfigRuntime<ElementSupport>
Parameters:
executingContinuable - the currently executing continuable
Returns:
true is the continuation should be cloned; or

false otherwise


getContinuationDuration

public long getContinuationDuration()
Description copied from class: ContinuationConfigRuntime
The duration, in milliseconds, by which a continuation stays valid.

When this period is exceeded, a continuation can not be retrieved anymore and it will be removed from the manager during the next purge.

Overrides:
getContinuationDuration in class ContinuationConfigRuntime<ElementSupport>
Returns:
the validity duration of a continuation in milliseconds

getContinuationPurgeFrequency

public int getContinuationPurgeFrequency()
Description copied from class: ContinuationConfigRuntime
The frequency by which the continuations purging will run in the ContinuationManager.

This works together with the scale that is configured through ContinuationConfigRuntime.getContinuationPurgeScale(). The frequency divided by the scale makes how often the purging will happen. For instance, a frequency of 20 and a scale of 1000 means that purging will happen 1/50th of the time.

Overrides:
getContinuationPurgeFrequency in class ContinuationConfigRuntime<ElementSupport>
Returns:
the continuation purge frequency
See Also:
ContinuationConfigRuntime.getContinuationPurgeScale()

getContinuationPurgeScale

public int getContinuationPurgeScale()
Description copied from class: ContinuationConfigRuntime
The scale that will be used to determine how often continuations purging will run in the ContinuationManager.

See ContinuationConfigRuntime.getContinuationPurgeScale() for more info.

Overrides:
getContinuationPurgeScale in class ContinuationConfigRuntime<ElementSupport>
Returns:
the continuation purge scale
See Also:
ContinuationConfigRuntime.getContinuationPurgeFrequency()


Copyright © 2001-2007 Uwyn sprl/bvba. All Rights Reserved.