A C F G H I L M O S T W 
All Classes All Packages

A

addLeaderLatchListener(LeaderLatchListener) - Method in class org.kiwiproject.curator.leader.ManagedLeaderLatchCreator
Adds the specified LeaderLatchListener.

C

check() - Method in class org.kiwiproject.curator.leader.health.ManagedLeaderLatchHealthCheck
 

F

from(CuratorFramework, Environment, ServiceDescriptor, LeaderLatchListener...) - Static method in class org.kiwiproject.curator.leader.ManagedLeaderLatchCreator
Static factory method to create a ManagedLeaderLatchCreator.

G

getHealthCheck() - Method in class org.kiwiproject.curator.leader.ManagedLeaderLatchCreator
Returns the health check (if registered) after ManagedLeaderLatchCreator.start() has been called.
getLatchState() - Method in class org.kiwiproject.curator.leader.ManagedLeaderLatch
Get the current latch state.
getLatchState() - Method in class org.kiwiproject.curator.leader.resource.LeaderResource
Get information about the leader latch that this service participates in.
getLeader() - Method in class org.kiwiproject.curator.leader.ManagedLeaderLatch
Get the leader of this latch.
getLeaderLatch() - Method in class org.kiwiproject.curator.leader.ManagedLeaderLatchCreator
Returns the ManagedLeaderLatch created after ManagedLeaderLatchCreator.start() has been called.
getListeners() - Method in class org.kiwiproject.curator.leader.ManagedLeaderLatchCreator
Returns a list containing all registered LeaderLatchListeners after ManagedLeaderLatchCreator.start() has been called.
getParticipants() - Method in class org.kiwiproject.curator.leader.ManagedLeaderLatch
Get the participants (i.e.
gotLeaderLatch() - Method in class org.kiwiproject.curator.leader.resource.GotLeaderLatchResource
Returns a 204 (No Content) response if available.
GotLeaderLatchResource - Class in org.kiwiproject.curator.leader.resource
JAX-RS resource providing a single endpoint that allows clients to determine whether this service participates in a leader latch.
GotLeaderLatchResource() - Constructor for class org.kiwiproject.curator.leader.resource.GotLeaderLatchResource
 

H

hasLeadership() - Method in class org.kiwiproject.curator.leader.ManagedLeaderLatch
Returns whether this instance is the leader, or throws a ManagedLeaderLatchException if Curator is not started yet, this latch is not started yet, or there are no latch participants yet.
hasLeadership() - Method in class org.kiwiproject.curator.leader.resource.LeaderResource
Checks whether this service is the latch leader.

I

isClosed() - Method in class org.kiwiproject.curator.leader.ManagedLeaderLatch
Check if the latch is closed.
isLeaderLatchStarted() - Method in class org.kiwiproject.curator.leader.ManagedLeaderLatchCreator
Has this instance created and started a ManagedLeaderLatch?
isStarted() - Method in class org.kiwiproject.curator.leader.ManagedLeaderLatch
Check if the latch is started.

L

leaderLatchId(String, String, String, int) - Static method in class org.kiwiproject.curator.leader.ManagedLeaderLatch
Utility method to generate a standard latch id for a service.
leaderLatchId(ServiceDescriptor) - Static method in class org.kiwiproject.curator.leader.ManagedLeaderLatch
Utility method to generate a standard latch id for a service.
leaderLatchPath(String) - Static method in class org.kiwiproject.curator.leader.ManagedLeaderLatch
Utility method to generate a standard latch path for a service.
LeaderResource - Class in org.kiwiproject.curator.leader.resource
JAX-RS resource providing endpoints for checking leadership and participant information.
LeaderResource(ManagedLeaderLatch) - Constructor for class org.kiwiproject.curator.leader.resource.LeaderResource
 

M

ManagedLeaderLatch - Class in org.kiwiproject.curator.leader
Wrapper around Curator's LeaderLatch which standardizes the id and latch path in ZooKeeper, and which registers with Dropwizard so that it manages the lifecycle (mainly to ensure the latch is stopped when the Dropwizard app stops).
ManagedLeaderLatch(CuratorFramework, String, String, LeaderLatchListener...) - Constructor for class org.kiwiproject.curator.leader.ManagedLeaderLatch
Construct a latch with a specific ID and standard latch path.
ManagedLeaderLatch(CuratorFramework, ServiceDescriptor, LeaderLatchListener...) - Constructor for class org.kiwiproject.curator.leader.ManagedLeaderLatch
Construct a latch with a standard ID and latch path.
ManagedLeaderLatchCreator - Class in org.kiwiproject.curator.leader
Entry point to initialize ManagedLeaderLatch, which wraps an Apache Curator LeaderLatch and allows for easy determination whether a JVM process is the leader in a group of JVMs connected to a ZooKeeper cluster.
ManagedLeaderLatchException - Exception in org.kiwiproject.curator.leader.exception
Exception that is thrown when there is some unexpected error relating to a managed Curator leader latch.
ManagedLeaderLatchException() - Constructor for exception org.kiwiproject.curator.leader.exception.ManagedLeaderLatchException
 
ManagedLeaderLatchException(String) - Constructor for exception org.kiwiproject.curator.leader.exception.ManagedLeaderLatchException
 
ManagedLeaderLatchException(String, Throwable) - Constructor for exception org.kiwiproject.curator.leader.exception.ManagedLeaderLatchException
 
ManagedLeaderLatchException(Throwable) - Constructor for exception org.kiwiproject.curator.leader.exception.ManagedLeaderLatchException
 
ManagedLeaderLatchHealthCheck - Class in org.kiwiproject.curator.leader.health
Simple check to determine if the leader latch is started (healthy) or otherwise (not healthy).
ManagedLeaderLatchHealthCheck(ManagedLeaderLatch) - Constructor for class org.kiwiproject.curator.leader.health.ManagedLeaderLatchHealthCheck
New health check instance for the given leader latch.

O

org.kiwiproject.curator.leader - package org.kiwiproject.curator.leader
 
org.kiwiproject.curator.leader.exception - package org.kiwiproject.curator.leader.exception
 
org.kiwiproject.curator.leader.health - package org.kiwiproject.curator.leader.health
 
org.kiwiproject.curator.leader.resource - package org.kiwiproject.curator.leader.resource
 

S

ServiceDescriptor - Class in org.kiwiproject.curator.leader
Value class that contains metadata about a service that participates in a leader latch.
ServiceDescriptor() - Constructor for class org.kiwiproject.curator.leader.ServiceDescriptor
 
start() - Method in class org.kiwiproject.curator.leader.ManagedLeaderLatch
Starts the latch, possibly creating non-existent znodes in ZooKeeper first.
start() - Method in class org.kiwiproject.curator.leader.ManagedLeaderLatchCreator
Starts the leader latch, performing the following actions: Creates a new ManagedLeaderLatch, starts it, and tells the Dropwizard lifecycle to manage (stop) it Creates and registers a ManagedLeaderLatchHealthCheck unless explicitly disabled via ManagedLeaderLatchCreator.withoutHealthCheck() Creates and registers the JAX-RS REST endpoints unless explicitly disabled via ManagedLeaderLatchCreator.withoutResources()
start(CuratorFramework, Environment, ServiceDescriptor, LeaderLatchListener...) - Static method in class org.kiwiproject.curator.leader.ManagedLeaderLatchCreator
If you want a ManagedLeaderLatch and you want the standard options (a health check and JAX-RS REST resources) and you might need references to them, use this method to create and start a latch.
startLeaderLatch(CuratorFramework, Environment, ServiceDescriptor, LeaderLatchListener...) - Static method in class org.kiwiproject.curator.leader.ManagedLeaderLatchCreator
If the only thing you want is a ManagedLeaderLatch and you want the standard options (a health check and JAX-RS REST resources) and you do not need references to them, use this method to create and start a latch.
stop() - Method in class org.kiwiproject.curator.leader.ManagedLeaderLatch
Stops the latch.

T

toString() - Method in class org.kiwiproject.curator.leader.ManagedLeaderLatch
 

W

whenLeader(Runnable) - Method in class org.kiwiproject.curator.leader.ManagedLeaderLatch
Perform the given action synchronously only if this latch is currently the leader.
whenLeader(Supplier<T>) - Method in class org.kiwiproject.curator.leader.ManagedLeaderLatch
Perform the given action defined by resultSupplier synchronously only if this latch is currently the leader, returning the result of resultSupplier.
whenLeaderAsync(Runnable) - Method in class org.kiwiproject.curator.leader.ManagedLeaderLatch
Perform the given action asynchronously only if this latch is currently the leader.
whenLeaderAsync(Supplier<T>) - Method in class org.kiwiproject.curator.leader.ManagedLeaderLatch
Perform the given action defined by resultSupplier asynchronously only if this latch is currently the leader, returning a CompletableFuture whose result will be the result of the resultSupplier.
whenLeaderAsync(Supplier<T>, Executor) - Method in class org.kiwiproject.curator.leader.ManagedLeaderLatch
Same as ManagedLeaderLatch.whenLeaderAsync(Supplier) but uses supplied executor instead of CompletableFuture's default executor.
withoutHealthCheck() - Method in class org.kiwiproject.curator.leader.ManagedLeaderLatchCreator
Configures without a health check.
withoutResources() - Method in class org.kiwiproject.curator.leader.ManagedLeaderLatchCreator
Configures without REST resources to check for leadership and if a leader latch is present.
A C F G H I L M O S T W 
All Classes All Packages