| Package | Description |
|---|---|
| org.apache.twill.discovery |
Classes in this package provides service discovery implementations.
|
| org.apache.twill.zookeeper |
This package provides functionality for ZooKeeper interactions.
|
| Constructor and Description |
|---|
ZKDiscoveryService(ZKClient zkClient)
Constructs ZKDiscoveryService using the provided zookeeper client for storing service registry.
|
ZKDiscoveryService(ZKClient zkClient,
String namespace)
Constructs ZKDiscoveryService using the provided zookeeper client for storing service registry under namespace.
|
| Modifier and Type | Interface and Description |
|---|---|
interface |
ZKClientService
A
ZKClient that extends from Service to provide lifecycle management functions. |
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractZKClient
An abstract base implementation of
ZKClient that simplifies implementation by providing forwarding for
methods that are meant to be delegated to other methods. |
class |
ForwardingZKClient |
class |
ForwardingZKClientService |
| Modifier and Type | Method and Description |
|---|---|
ZKClient |
ForwardingZKClient.getDelegate() |
static ZKClient |
ZKClients.namespace(ZKClient zkClient,
String namespace)
Creates a
ZKClient that will add prefix namespace for every paths. |
static ZKClient |
ZKClients.retryOnFailure(ZKClient client,
RetryStrategy retryStrategy)
Creates a
ZKClient that will retry interim failure (e.g. |
static ZKClient |
ZKClients.reWatchOnExpire(ZKClient client)
Creates a
ZKClient that will perform auto re-watch on all existing watches
when reconnection happens after session expiration. |
| Modifier and Type | Method and Description |
|---|---|
static ZKClientService |
ZKClientServices.delegate(ZKClient client)
Creates a
ZKClientService from the given ZKClient if the given ZKClient is an instance of
ZKClientService or is a ForwardingZKClient that eventually trace back to a delegate of type
ZKClientService. |
static ZKClientService |
ZKClientServices.delegate(ZKClient client,
ZKClientService clientService)
Creates a
ZKClientService that for all ZKClient methods would be delegated to another
ZKClient, while methods for ZKClientService would be delegated to another ZKClientService,
which the given ZKClient and ZKClientService could be different instances. |
static ZKClient |
ZKClients.namespace(ZKClient zkClient,
String namespace)
Creates a
ZKClient that will add prefix namespace for every paths. |
static OperationFuture<String> |
ZKOperations.recursiveDelete(ZKClient zkClient,
String path)
Deletes the given path recursively.
|
static ZKClient |
ZKClients.retryOnFailure(ZKClient client,
RetryStrategy retryStrategy)
Creates a
ZKClient that will retry interim failure (e.g. |
static ZKClient |
ZKClients.reWatchOnExpire(ZKClient client)
Creates a
ZKClient that will perform auto re-watch on all existing watches
when reconnection happens after session expiration. |
static Cancellable |
ZKOperations.watchChildren(ZKClient zkClient,
String path,
ZKOperations.ChildrenCallback callback) |
static Cancellable |
ZKOperations.watchData(ZKClient zkClient,
String path,
ZKOperations.DataCallback callback)
Watch for data changes of the given path.
|
static com.google.common.util.concurrent.ListenableFuture<String> |
ZKOperations.watchDeleted(ZKClient zkClient,
String path) |
static void |
ZKOperations.watchDeleted(ZKClient zkClient,
String path,
com.google.common.util.concurrent.SettableFuture<String> completion) |
| Constructor and Description |
|---|
ForwardingZKClient(ZKClient delegate) |
Copyright © 2013-2016 The Apache Software Foundation. All rights reserved.