Class RhinoTimerOptions
- java.lang.Object
-
- javax.slee.facilities.TimerOptions
-
- com.opencloud.rhino.facilities.RhinoTimerOptions
-
- All Implemented Interfaces:
Serializable
public class RhinoTimerOptions extends TimerOptions
An extension of the JAIN SLEE-defined class that provides access to Rhino-specific features.
Replication Factor
The replication factor specifies the number of remote timer server nodes that the timer will be arbitrarily replicated to when armed on an activity that replicates using a mechanism other than the traditional savanna framework. The default value is 0, meaning the timer will not be replicated on these activities.If a replication factor greater than 0 is specified, then the convergence name session ownership record option must also be set. The value of this option is ignored if the activity replicates using savanna, or is not replicated at all, although the condition specified by the previous sentence still holds true in any case. In other words, if a replication factor greater than 0 is specified then the convergence name session ownership record option must also be set, even if the replication factor will be ignored as a result of the replication mode of the activity. The reason for this is to provide consistent application behaviour regardless of how an administrator might configure the Rhino cluster the application runs on.
Convergence Name Session Ownership Record
The convergence name session ownership record of the SBB entity tree arming the timer, as returned by one of:This record is used to identify current ownership of the SBB entity tree within the Rhino cluster when a replicated timer fires.
- Since:
- Rhino 2.6.1
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RhinoTimerOptions()Create aRhinoTimerOptionsobject that describes the default timer behaviour.RhinoTimerOptions(int replicationFactor, ConvergenceNameSessionOwnershipRecord convergenceNameRecord)Create aRhinoTimerOptionsobject for the specified timer behaviour.RhinoTimerOptions(long timeout, TimerPreserveMissed preserveMissed, int replicationFactor, ConvergenceNameSessionOwnershipRecord convergenceNameRecord)Create aRhinoTimerOptionsobject for the specified timer behaviour.RhinoTimerOptions(TimerOptions options)Create aRhinoTimerOptionsobject that has the same behavioural properties as anotherTimerOptions.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Compare this Rhino timer options object for equality with another.ConvergenceNameSessionOwnershipRecordgetConvergenceNameSessionOwnershipRecord()Get the convergence name session ownership record of the SBB entity tree owning the timer.intgetReplicationFactor()Get the timer replication factor.voidsetConvergenceNameSessionOwnershipRecord(ConvergenceNameSessionOwnershipRecord convergenceNameRecord)Set the convergence name session ownership record for the SBB entity tree owning the timer.voidsetReplicationFactor(int replicationFactor)Set the timer replication factor.StringtoString()Get the textual representation of the Rhino timer options object.-
Methods inherited from class javax.slee.facilities.TimerOptions
getPreserveMissed, getTimeout, hashCode, isPersistent, setPersistent, setPreserveMissed, setTimeout
-
-
-
-
Constructor Detail
-
RhinoTimerOptions
public RhinoTimerOptions()
Create a
RhinoTimerOptionsobject that describes the default timer behaviour. The default timer behaviour is:-
the default behaviour as defined by the
TimerOptionssuperclass -
a replication factor of 0
-
no convergence name session ownership record set.
- Since:
- Rhino 2.6.1
-
-
RhinoTimerOptions
public RhinoTimerOptions(TimerOptions options)
Create a
RhinoTimerOptionsobject that has the same behavioural properties as anotherTimerOptions. If the provided argument is aRhinoTimerOptionsobject, then the behaviour defined by the extension properties is also copied to this, otherwise the default behaviour for these properties is used. The default behaviour for the extension properties is:-
a replication factor of 0
-
no convergence name session ownership record set.
- Parameters:
options- theTimerOptionsobject to copy.- Since:
- Rhino 2.6.1
-
-
RhinoTimerOptions
public RhinoTimerOptions(int replicationFactor, ConvergenceNameSessionOwnershipRecord convergenceNameRecord) throws IllegalArgumentExceptionCreate a
RhinoTimerOptionsobject for the specified timer behaviour. The default timer behaviour is used for the SLEE-defined timer options, as specified byTimerOptions().- Parameters:
replicationFactor- the replication factor.convergenceNameRecord- the convergence name session ownership record of the SBB entity tree owning the timer.- Throws:
IllegalArgumentException- ifreplicationFactoris less than zero.- Since:
- Rhino 2.6.1
-
RhinoTimerOptions
public RhinoTimerOptions(long timeout, TimerPreserveMissed preserveMissed, int replicationFactor, ConvergenceNameSessionOwnershipRecord convergenceNameRecord) throws NullPointerException, IllegalArgumentExceptionCreate a
RhinoTimerOptionsobject for the specified timer behaviour. The deprecatedpersistentoption is set tofalseby this constructor.- Parameters:
timeout- the timeout period for the timer (specified in milliseconds).preserveMissed- the behaviour of late timers.replicationFactor- the replication factor.convergenceNameRecord- the convergence name session ownership record of the SBB entity tree owning the timer.- Throws:
NullPointerException- ifpreserveMissedisnull.IllegalArgumentException- iftimeoutorreplicationFactoris less than zero.- Since:
- Rhino 2.6.1
-
-
Method Detail
-
getReplicationFactor
public int getReplicationFactor()
Get the timer replication factor.
- Returns:
- the timer replication factor.
- Since:
- Rhino 2.6.1
-
setReplicationFactor
public void setReplicationFactor(int replicationFactor)
Set the timer replication factor.
- Parameters:
replicationFactor- the timer replication factor.- Throws:
IllegalArgumentException- ifreplicationFactoris less than zero.- Since:
- Rhino 2.6.1
-
getConvergenceNameSessionOwnershipRecord
public ConvergenceNameSessionOwnershipRecord getConvergenceNameSessionOwnershipRecord()
Get the convergence name session ownership record of the SBB entity tree owning the timer.
- Returns:
- the convergence name session ownership record of the SBB entity tree, or
nullif none has been set. - Since:
- Rhino 2.6.1
-
setConvergenceNameSessionOwnershipRecord
public void setConvergenceNameSessionOwnershipRecord(ConvergenceNameSessionOwnershipRecord convergenceNameRecord)
Set the convergence name session ownership record for the SBB entity tree owning the timer.
- Parameters:
convergenceNameRecord- the convergence name session ownership record of the SBB entity tree.- Since:
- Rhino 2.6.1
-
equals
public boolean equals(Object o)
Compare this Rhino timer options object for equality with another.
- Overrides:
equalsin classTimerOptions- Parameters:
o- the object to compare this with.- Returns:
trueifois an instance of this class representing the same Rhino timer options as this,falseotherwise.
-
toString
public String toString()
Get the textual representation of the Rhino timer options object.
- Overrides:
toStringin classTimerOptions- Returns:
- the textual representation of the Rhino timer options object.
-
-