com.netflix.curator.framework.recipes.locks
Class ChildReaper
java.lang.Object
com.netflix.curator.framework.recipes.locks.ChildReaper
- All Implemented Interfaces:
- java.io.Closeable
public class ChildReaper
- extends java.lang.Object
- implements java.io.Closeable
Utility to reap empty child nodes of a parent node. Periodically calls getChildren on
the node and adds empty nodes to an internally managed Reaper
|
Constructor Summary |
ChildReaper(com.netflix.curator.framework.CuratorFramework client,
java.lang.String path,
Reaper.Mode mode)
|
ChildReaper(com.netflix.curator.framework.CuratorFramework client,
java.lang.String path,
Reaper.Mode mode,
int reapingThresholdMs)
|
ChildReaper(com.netflix.curator.framework.CuratorFramework client,
java.lang.String path,
Reaper.Mode mode,
java.util.concurrent.ScheduledExecutorService executor,
int reapingThresholdMs)
|
|
Method Summary |
void |
close()
|
void |
start()
The reaper must be started |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ChildReaper
public ChildReaper(com.netflix.curator.framework.CuratorFramework client,
java.lang.String path,
Reaper.Mode mode)
- Parameters:
client - the clientpath - path to reap children frommode - reaping mode
ChildReaper
public ChildReaper(com.netflix.curator.framework.CuratorFramework client,
java.lang.String path,
Reaper.Mode mode,
int reapingThresholdMs)
- Parameters:
client - the clientpath - path to reap children fromreapingThresholdMs - threshold in milliseconds that determines that a path can be deletedmode - reaping mode
ChildReaper
public ChildReaper(com.netflix.curator.framework.CuratorFramework client,
java.lang.String path,
Reaper.Mode mode,
java.util.concurrent.ScheduledExecutorService executor,
int reapingThresholdMs)
- Parameters:
client - the clientpath - path to reap children fromexecutor - executor to use for background tasksreapingThresholdMs - threshold in milliseconds that determines that a path can be deletedmode - reaping mode
start
public void start()
throws java.lang.Exception
- The reaper must be started
- Throws:
java.lang.Exception - errors
close
public void close()
throws java.io.IOException
- Specified by:
close in interface java.io.Closeable
- Throws:
java.io.IOException