public class LayoutView extends AbstractView
Constructor and Description |
---|
LayoutView(CorfuRuntime runtime) |
Modifier and Type | Method and Description |
---|---|
void |
committed(long epoch,
Layout layout)
Send committed layout to the old Layout servers and the new Layout Servers.
|
void |
committed(long epoch,
Layout layout,
boolean force)
Send committed layout to the old Layout servers and the new Layout Servers.
|
Layout |
getLayout()
Retrieves current layout.
|
int |
getQuorumNumber()
Retrieves the number of nodes needed to obtain a quorum.
|
RuntimeLayout |
getRuntimeLayout() |
RuntimeLayout |
getRuntimeLayout(Layout layout) |
Layout |
prepare(long epoch,
long rank)
Sends prepare to the current layout and can proceed only if it is accepted by a quorum.
|
Layout |
propose(long epoch,
long rank,
Layout layout)
Proposes new layout to all the servers in the current layout.
|
void |
updateLayout(Layout layout,
long rank)
Drives the consensus protocol for persisting the new Layout.
|
getCurrentLayout, layoutHelper, layoutHelper
public LayoutView(@Nonnull CorfuRuntime runtime)
public Layout getLayout()
public RuntimeLayout getRuntimeLayout()
public RuntimeLayout getRuntimeLayout(@Nonnull Layout layout)
public int getQuorumNumber()
public void updateLayout(Layout layout, long rank) throws QuorumUnreachableException, OutrankedException, WrongEpochException
layout
- The layout to propose.rank
- The rank for the proposed layout.QuorumUnreachableException
- Thrown if responses not received from a majority of
layout servers.OutrankedException
- outranked exception, i.e., higher rank.WrongEpochException
- wrong epoch number.public Layout prepare(long epoch, long rank) throws QuorumUnreachableException, OutrankedException, WrongEpochException
rank
- The rank for the proposed layout.QuorumUnreachableException
- Thrown if responses not received from a majority of
layout servers.OutrankedException
- outranked exception, i.e., higher rank.WrongEpochException
- wrong epoch number.public Layout propose(long epoch, long rank, Layout layout) throws QuorumUnreachableException, OutrankedException
QuorumUnreachableException
- Thrown if responses not received from a majority of
layout servers.OutrankedException
- outranked exception, i.e., higher rank.public void committed(long epoch, Layout layout)
WrongEpochException
- wrong epoch number.public void committed(long epoch, Layout layout, boolean force) throws WrongEpochException
WrongEpochException
Copyright © 2019 CorfuDB. All rights reserved.