Constructor and Description |
---|
LayoutClient(IClientRouter router,
long epoch) |
Modifier and Type | Method and Description |
---|---|
CompletableFuture<Boolean> |
bootstrapLayout(Layout l)
Bootstraps a layout server.
|
CompletableFuture<Boolean> |
committed(long epoch,
Layout layout)
Informs the server that the proposal (layout) has been committed to a quorum.
|
CompletableFuture<Boolean> |
force(Layout layout)
Send a force commit layout request to a layout server
|
CompletableFuture<Layout> |
getLayout()
Retrieves the layout from the endpoint, asynchronously.
|
CompletableFuture<LayoutPrepareResponse> |
prepare(long epoch,
long rank)
Begins phase 1 of a Paxos round with a prepare message.
|
CompletableFuture<Boolean> |
propose(long epoch,
long rank,
Layout layout)
Begins phase 2 of a Paxos round with a propose message.
|
void |
sendMessage(CorfuMsg msg) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getHandledTypes, getMsgHandler, getRouter, handleMessage, setRouter
public LayoutClient(IClientRouter router, long epoch)
public CompletableFuture<Layout> getLayout()
public CompletableFuture<Boolean> bootstrapLayout(Layout l)
l
- The layout to bootstrap with.public CompletableFuture<LayoutPrepareResponse> prepare(long epoch, long rank)
epoch
- epoch for which the paxos rounds are being runrank
- The rank to use for the prepare.public CompletableFuture<Boolean> propose(long epoch, long rank, Layout layout)
epoch
- epoch for which the paxos rounds are being runrank
- The rank to use for the propose. It should be the same
rank from a successful prepare (phase 1).layout
- The layout to install for phase 2.public CompletableFuture<Boolean> committed(long epoch, Layout layout)
epoch
- epoch affiliated with the layout.layout
- Layout to be committed.public CompletableFuture<Boolean> force(@Nonnull Layout layout)
layout
- the new layout to force commitpublic void sendMessage(CorfuMsg msg)
Copyright © 2019 CorfuDB. All rights reserved.