|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.netflix.curator.framework.recipes.locks.Reaper
public class Reaper
Utility to clean up parent lock nodes so that they don't stay around as garbage
| Nested Class Summary | |
|---|---|
static class |
Reaper.Mode
|
| Constructor Summary | |
|---|---|
Reaper(com.netflix.curator.framework.CuratorFramework client)
Uses the default reaping threshold of 5 minutes and creates an internal thread pool |
|
Reaper(com.netflix.curator.framework.CuratorFramework client,
int reapingThresholdMs)
Uses the given reaping threshold and creates an internal thread pool |
|
Reaper(com.netflix.curator.framework.CuratorFramework client,
java.util.concurrent.ScheduledExecutorService executor,
int reapingThresholdMs)
|
|
| Method Summary | |
|---|---|
void |
addPath(java.lang.String path)
Add a path (using Mode.REAP_INDEFINITELY) to be checked by the reaper. |
void |
addPath(java.lang.String path,
Reaper.Mode mode)
Add a path to be checked by the reaper. |
void |
close()
|
boolean |
removePath(java.lang.String path)
Stop reaping the given path |
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 |
| Constructor Detail |
|---|
public Reaper(com.netflix.curator.framework.CuratorFramework client)
client - client
public Reaper(com.netflix.curator.framework.CuratorFramework client,
int reapingThresholdMs)
client - clientreapingThresholdMs - threshold in milliseconds that determines that a path can be deleted
public Reaper(com.netflix.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 deleted| Method Detail |
|---|
public void addPath(java.lang.String path)
path - path to check
public void addPath(java.lang.String path,
Reaper.Mode mode)
path - path to checkmode - reaping modepublic boolean removePath(java.lang.String path)
path - path to remove
public void start()
throws java.lang.Exception
java.lang.Exception - errors
public void close()
throws java.io.IOException
close in interface java.io.Closeablejava.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||