public interface GroupMember
DistributedMembershipGroup.
A GroupMember represents a reference to a single instance of a resource which has
joined a membership group. Each member is guaranteed to
have a unique id() throughout the lifetime of the distributed resource. Group members
can schedule or execute callbacks
remotely on member nodes.
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Void> |
execute(Runnable callback)
Executes a callback on the group member.
|
long |
id()
Returns the member ID.
|
CompletableFuture<Void> |
schedule(Duration delay,
Runnable callback)
Schedules a callback to run after the given delay on the member.
|
CompletableFuture<Void> |
schedule(Instant instant,
Runnable callback)
Schedules a callback to run at the given instant.
|
long id()
CompletableFuture<Void> schedule(Instant instant, Runnable callback)
instant - The instant at which to run the callback.callback - The callback to run.CompletableFuture<Void> schedule(Duration delay, Runnable callback)
delay - The delay after which to run the callback.callback - The callback to run.CompletableFuture<Void> execute(Runnable callback)
callback - The callback to execute.Copyright © 2013–2015. All rights reserved.