Class 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 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 another TimerOptions. If the provided argument is a RhinoTimerOptions 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 - the TimerOptions 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 by TimerOptions().

        Parameters:
        replicationFactor - the replication factor.
        convergenceNameRecord - the convergence name session ownership record of the SBB entity tree owning the timer.
        Throws:
        IllegalArgumentException - if replicationFactor 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 deprecated persistent option is set to false 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 - if preserveMissed is null.
        IllegalArgumentException - if timeout or replicationFactor 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 - if replicationFactor 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 class TimerOptions
        Parameters:
        o - the object to compare this with.
        Returns:
        true if o 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 class TimerOptions
        Returns:
        the textual representation of the Rhino timer options object.