/// <summary> Setup this object's state /// /// </summary> /// <param name="cmd">the callback object for retranmissions /// </param> /// <param name="retransmit_timeout">the interval between two consecutive /// retransmission attempts /// </param> /// <param name="sched">the external scheduler to use to schedule retransmissions /// </param> /// <param name="sched_owned">if true, the scheduler is owned by this object and /// can be started/stopped/destroyed. If false, the scheduler is shared /// among multiple objects and start()/stop() should not be called from /// within this object /// /// </param> /// <throws> IllegalArgumentException if <code>cmd</code> is null </throws> private void init(AckMcastSenderWindow.RetransmitCommand cmd, long[] retransmit_intervals, TimeScheduler sched, bool sched_owned) { if (cmd == null) { NCacheLog.Error("AckMcastSenderWindow.init", "command is null. Cannot retransmit " + "messages !"); throw new System.ArgumentException("Command is null."); } retransmitter_owned = sched_owned; retransmitter = sched; this.retransmit_intervals = retransmit_intervals; this.cmd = cmd; start(); }
/// <summary> Create and <b>start</b> the retransmitter /// /// </summary> /// <param name="cmd">the callback object for retranmissions /// </param> /// <param name="retransmit_timeout">the interval between two consecutive /// retransmission attempts /// /// </param> /// <throws> IllegalArgumentException if <code>cmd</code> is null </throws> public AckMcastSenderWindow(AckMcastSenderWindow.RetransmitCommand cmd, long[] retransmit_intervals, ILogger NCacheLog) { this._ncacheLog = NCacheLog; init(cmd, retransmit_intervals, new TimeScheduler(SUSPEND_TIMEOUT), true); }
/// <summary> Create and <b>start</b> the retransmitter /// /// </summary> /// <param name="cmd">the callback object for retranmissions /// </param> /// <param name="sched">the external scheduler to use to schedule retransmissions /// /// </param> /// <throws> IllegalArgumentException if <code>cmd</code> is null </throws> public AckMcastSenderWindow(AckMcastSenderWindow.RetransmitCommand cmd, TimeScheduler sched, ILogger NCacheLog) { this._ncacheLog = NCacheLog; init(cmd, RETRANSMIT_TIMEOUTS, sched, false); }