/// <param name="client">the client</param> /// <param name="path">path to reap children from</param> /// <param name="executor">executor to use for background tasks</param> /// <param name="reapingThresholdMs">threshold in milliseconds that determines that a path can be deleted /// </param> /// <param name="mode">reaping mode</param> /// <param name="leaderPath">if not null, uses a leader selection so that only 1 reaper is active in the cluster /// </param> public ChildReaper(CuratorFramework client, string path, Reaper.Mode mode, ScheduledExecutorService executor, int reapingThresholdMs, string leaderPath) { this.client = client; this.mode = mode; this.executor = new CloseableScheduledExecutorService(executor); this.reapingThresholdMs = reapingThresholdMs; this.reaper = new Reaper(client, executor, reapingThresholdMs, leaderPath); AddPath(path); }
/// <param name="client">the client</param> /// <param name="path">path to reap children from</param> /// <param name="reapingThresholdMs">threshold in milliseconds that determines that a path can be deleted /// </param> /// <param name="mode">reaping mode</param> public ChildReaper(CuratorFramework client, string path, Reaper.Mode mode, int reapingThresholdMs ) : this(client, path, mode, NewExecutorService(), reapingThresholdMs, null) { }
/// <param name="client">the client</param> /// <param name="path">path to reap children from</param> /// <param name="executor">executor to use for background tasks</param> /// <param name="reapingThresholdMs">threshold in milliseconds that determines that a path can be deleted /// </param> /// <param name="mode">reaping mode</param> public ChildReaper(CuratorFramework client, string path, Reaper.Mode mode, ScheduledExecutorService executor, int reapingThresholdMs) : this(client, path, mode, executor, reapingThresholdMs, null) { }