com.sleepycat.je.rep.elections
Interface Acceptor.SuggestionGenerator

All Known Implementing Classes:
MasterSuggestionGenerator
Enclosing class:
Acceptor

public static interface Acceptor.SuggestionGenerator


Method Summary
 Protocol.Value get(Proposer.Proposal proposal)
          Used to generate a suggested value for use by a Proposer.
 long getRanking(Proposer.Proposal proposal)
          The importance associated with the above suggestion.
 

Method Detail

get

Protocol.Value get(Proposer.Proposal proposal)
Used to generate a suggested value for use by a Proposer. It's a hint. The proposal argument may be used to freeze values like the VLSN number from advancing (if they were used in the ranking) until an election has completed.

Parameters:
proposal - the Proposal for which the value is being suggested.
Returns:
the suggested value.

getRanking

long getRanking(Proposer.Proposal proposal)
The importance associated with the above suggestion. Acceptors have to agree on a common system for ranking importance so that the relative importance of different suggestions can be meaningfully compared.

Parameters:
the - proposal associated with the ranking
Returns:
the importance of the suggestion as a number


Copyright (c) 2004-2012 Oracle. All rights reserved.