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 aRhinoTimerOptions
object that describes the default timer behaviour.RhinoTimerOptions(int replicationFactor, ConvergenceNameSessionOwnershipRecord convergenceNameRecord)
Create aRhinoTimerOptions
object for the specified timer behaviour.RhinoTimerOptions(long timeout, TimerPreserveMissed preserveMissed, int replicationFactor, ConvergenceNameSessionOwnershipRecord convergenceNameRecord)
Create aRhinoTimerOptions
object for the specified timer behaviour.RhinoTimerOptions(TimerOptions options)
Create aRhinoTimerOptions
object that has the same behavioural properties as anotherTimerOptions
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
Compare this Rhino timer options object for equality with another.ConvergenceNameSessionOwnershipRecord
getConvergenceNameSessionOwnershipRecord()
Get the convergence name session ownership record of the SBB entity tree owning the timer.int
getReplicationFactor()
Get the timer replication factor.void
setConvergenceNameSessionOwnershipRecord(ConvergenceNameSessionOwnershipRecord convergenceNameRecord)
Set the convergence name session ownership record for the SBB entity tree owning the timer.void
setReplicationFactor(int replicationFactor)
Set the timer replication factor.String
toString()
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
RhinoTimerOptions
object that describes the default timer behaviour. The default timer behaviour is:-
the default behaviour as defined by the
TimerOptions
superclass -
a replication factor of 0
-
no convergence name session ownership record set.
- Since:
- Rhino 2.6.1
-
-
RhinoTimerOptions
public RhinoTimerOptions(TimerOptions options)
Create a
RhinoTimerOptions
object that has the same behavioural properties as anotherTimerOptions
. If the provided argument is aRhinoTimerOptions
object, 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
- theTimerOptions
object to copy.- Since:
- Rhino 2.6.1
-
-
RhinoTimerOptions
public RhinoTimerOptions(int replicationFactor, ConvergenceNameSessionOwnershipRecord convergenceNameRecord) throws IllegalArgumentException
Create a
RhinoTimerOptions
object 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
- ifreplicationFactor
is less than zero.- Since:
- Rhino 2.6.1
-
RhinoTimerOptions
public RhinoTimerOptions(long timeout, TimerPreserveMissed preserveMissed, int replicationFactor, ConvergenceNameSessionOwnershipRecord convergenceNameRecord) throws NullPointerException, IllegalArgumentException
Create a
RhinoTimerOptions
object for the specified timer behaviour. The deprecatedpersistent
option is set tofalse
by 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
- ifpreserveMissed
isnull
.IllegalArgumentException
- iftimeout
orreplicationFactor
is 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
- ifreplicationFactor
is 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
null
if 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:
equals
in classTimerOptions
- Parameters:
o
- the object to compare this with.- Returns:
true
ifo
is an instance of this class representing the same Rhino timer options as this,false
otherwise.
-
toString
public String toString()
Get the textual representation of the Rhino timer options object.
- Overrides:
toString
in classTimerOptions
- Returns:
- the textual representation of the Rhino timer options object.
-
-