java.io.Closeable, java.lang.AutoCloseableCreateMode.CONTAINER.
Also, all Curator recipes create container parents.@Deprecated
public class Reaper
extends java.lang.Object
implements java.io.Closeable
| Modifier and Type | Class | Description |
|---|---|---|
static class |
Reaper.Mode |
Deprecated.
|
| Constructor | Description |
|---|---|
Reaper(org.apache.curator.framework.CuratorFramework client) |
Deprecated.
Uses the default reaping threshold of 5 minutes and creates an internal thread pool
|
Reaper(org.apache.curator.framework.CuratorFramework client,
int reapingThresholdMs) |
Deprecated.
Uses the given reaping threshold and creates an internal thread pool
|
Reaper(org.apache.curator.framework.CuratorFramework client,
java.util.concurrent.ScheduledExecutorService executor,
int reapingThresholdMs) |
Deprecated.
|
Reaper(org.apache.curator.framework.CuratorFramework client,
java.util.concurrent.ScheduledExecutorService executor,
int reapingThresholdMs,
java.lang.String leaderPath) |
Deprecated.
|
Reaper(org.apache.curator.framework.CuratorFramework client,
java.util.concurrent.ScheduledExecutorService executor,
int reapingThresholdMs,
LeaderLatch leaderLatch) |
Deprecated.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
addPath(java.lang.String path) |
Deprecated.
Add a path (using Mode.REAP_INDEFINITELY) to be checked by the reaper.
|
void |
addPath(java.lang.String path,
Reaper.Mode mode) |
Deprecated.
Add a path to be checked by the reaper.
|
void |
close() |
Deprecated.
|
static java.util.concurrent.ScheduledExecutorService |
newExecutorService() |
Deprecated.
Allocate an executor service for the reaper
|
protected void |
reap(org.apache.curator.framework.recipes.locks.Reaper.PathHolder holder) |
Deprecated.
|
boolean |
removePath(java.lang.String path) |
Deprecated.
Stop reaping the given path
|
protected java.util.concurrent.Future<?> |
schedule(org.apache.curator.framework.recipes.locks.Reaper.PathHolder pathHolder,
int reapingThresholdMs) |
Deprecated.
|
void |
start() |
Deprecated.
The reaper must be started
|
public Reaper(org.apache.curator.framework.CuratorFramework client)
client - clientpublic Reaper(org.apache.curator.framework.CuratorFramework client,
int reapingThresholdMs)
client - clientreapingThresholdMs - threshold in milliseconds that determines that a path can be deletedpublic Reaper(org.apache.curator.framework.CuratorFramework client,
java.util.concurrent.ScheduledExecutorService executor,
int reapingThresholdMs)
client - clientexecutor - thread poolreapingThresholdMs - threshold in milliseconds that determines that a path can be deletedpublic Reaper(org.apache.curator.framework.CuratorFramework client,
java.util.concurrent.ScheduledExecutorService executor,
int reapingThresholdMs,
java.lang.String leaderPath)
client - clientexecutor - thread poolreapingThresholdMs - threshold in milliseconds that determines that a path can be deletedleaderPath - if not null, uses a leader selection so that only 1 reaper is active in the clusterpublic Reaper(org.apache.curator.framework.CuratorFramework client,
java.util.concurrent.ScheduledExecutorService executor,
int reapingThresholdMs,
LeaderLatch leaderLatch)
client - clientexecutor - thread poolreapingThresholdMs - threshold in milliseconds that determines that a path can be deletedleaderLatch - a pre-created leader latch to ensure only 1 reaper is active in the clusterpublic void addPath(java.lang.String path)
path - path to checkpublic void addPath(java.lang.String path,
Reaper.Mode mode)
path - path to checkmode - reaping modepublic boolean removePath(java.lang.String path)
path - path to removepublic void start()
throws java.lang.Exception
java.lang.Exception - errorspublic void close()
throws java.io.IOException
close in interface java.lang.AutoCloseableclose in interface java.io.Closeablejava.io.IOExceptionprotected java.util.concurrent.Future<?> schedule(org.apache.curator.framework.recipes.locks.Reaper.PathHolder pathHolder,
int reapingThresholdMs)
protected void reap(org.apache.curator.framework.recipes.locks.Reaper.PathHolder holder)
public static java.util.concurrent.ScheduledExecutorService newExecutorService()
Copyright © 2011–2018 The Apache Software Foundation. All rights reserved.