ostore.agree
Class AgreementState

java.lang.Object
  |
  +--ostore.agree.AgreementState

public class AgreementState
extends Object

The state associated with a given agreement request.

Version:
$Id: AgreementState.java,v 1.11 2002/12/04 02:59:54 srhea Exp $
Author:
Sean C. Rhea

Field Summary
static int CERTIFIED_STATE
           
 int commit_count
           
 Pair[] commits
          The req_digests/timestamps received in CommitMsgs from other replicas.
static int COMMITTED_STATE
           
static int EXECUTED_STATE
           
static int EXECUTING_STATE
           
static int INIT_STATE
           
 int prepare_count
           
static int PREPARE_STATE
           
static int PREPARED_STATE
           
 Pair[] prepares
          The req_digests/timestamps received in PrepareMsgs from other replicas.
 long seq
           
 int[] share_info
           
static int SIGNED_STATE
           
static int SIGNING_STATE
           
 int state
           
static String[] state_string
           
 long view
           
 
Constructor Summary
AgreementState(int ring_size, long v, long s, int member_num)
           
 
Method Summary
 void clear_overall_result_digest(int member)
           
 boolean have_all_reqs()
          Precondition: have_preprepare ()
 boolean have_all_results()
           
 boolean have_overall_result_digest()
           
 boolean have_overall_result_digest(int member)
           
 boolean have_overall_result()
           
 boolean have_preprepare()
           
 boolean have_req(SecureHash req_digest)
          Precondition: have_preprepare ()
 boolean have_result(int i)
           
 boolean have_signed_overall_result()
           
 boolean have_sigshare(int member)
           
 void invalidate_sigshare(int member)
           
 int num_reqs()
           
 SecureHash overall_digest()
           
 SecureHash overall_result_digest()
           
 SecureHash overall_result_digest(int member)
           
 QuickSerializable overall_result()
           
 SecureHash req_digest(int i)
           
 QuickSerializable req(int i)
           
 QuickSerializable result(int i)
           
 void set_overall_result_digest(int member, SecureHash val)
           
 void set_overall_result(QuickSerializable result)
           
 void set_preprepare_info(QSArray req_digests, QSDate ts)
           
 void set_req(QuickSerializable req, SecureHash req_digest, SecureHash src)
           
 void set_result(SecureHash req_digest, QuickSerializable result)
           
 void set_signed_overall_result(SignedQS value)
           
 void set_sigshare(int member, SigShare share)
           
 SignedQS signed_overall_result()
           
 int sigshare_count()
           
 boolean sigshare_invalid(int member)
           
 String sigshare_state(int member)
           
 boolean sigshare_unchecked(int member)
           
 SigShare sigshare(int member)
           
 SecureHash src(int i)
           
 QSDate timestamp()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INIT_STATE

public static final int INIT_STATE
See Also:
Constant Field Values

PREPARE_STATE

public static final int PREPARE_STATE
See Also:
Constant Field Values

PREPARED_STATE

public static final int PREPARED_STATE
See Also:
Constant Field Values

COMMITTED_STATE

public static final int COMMITTED_STATE
See Also:
Constant Field Values

EXECUTING_STATE

public static final int EXECUTING_STATE
See Also:
Constant Field Values

EXECUTED_STATE

public static final int EXECUTED_STATE
See Also:
Constant Field Values

SIGNING_STATE

public static final int SIGNING_STATE
See Also:
Constant Field Values

SIGNED_STATE

public static final int SIGNED_STATE
See Also:
Constant Field Values

CERTIFIED_STATE

public static final int CERTIFIED_STATE
See Also:
Constant Field Values

state_string

public static final String[] state_string

state

public int state

view

public long view

seq

public long seq

prepare_count

public int prepare_count

commit_count

public int commit_count

prepares

public Pair[] prepares
The req_digests/timestamps received in PrepareMsgs from other replicas.


commits

public Pair[] commits
The req_digests/timestamps received in CommitMsgs from other replicas.


share_info

public int[] share_info
Constructor Detail

AgreementState

public AgreementState(int ring_size,
                      long v,
                      long s,
                      int member_num)
Method Detail

timestamp

public final QSDate timestamp()

have_all_reqs

public final boolean have_all_reqs()
Precondition: have_preprepare ()


have_preprepare

public final boolean have_preprepare()

set_preprepare_info

public final void set_preprepare_info(QSArray req_digests,
                                      QSDate ts)

have_req

public final boolean have_req(SecureHash req_digest)
Precondition: have_preprepare ()


set_req

public final void set_req(QuickSerializable req,
                          SecureHash req_digest,
                          SecureHash src)

num_reqs

public final int num_reqs()

req

public final QuickSerializable req(int i)

result

public final QuickSerializable result(int i)

set_result

public final void set_result(SecureHash req_digest,
                             QuickSerializable result)

have_result

public final boolean have_result(int i)

have_all_results

public final boolean have_all_results()

req_digest

public final SecureHash req_digest(int i)

src

public final SecureHash src(int i)

overall_digest

public final SecureHash overall_digest()

set_overall_result

public final void set_overall_result(QuickSerializable result)

have_overall_result

public final boolean have_overall_result()

overall_result

public final QuickSerializable overall_result()

overall_result_digest

public final SecureHash overall_result_digest()

have_overall_result_digest

public final boolean have_overall_result_digest()

overall_result_digest

public final SecureHash overall_result_digest(int member)

have_overall_result_digest

public final boolean have_overall_result_digest(int member)

set_overall_result_digest

public final void set_overall_result_digest(int member,
                                            SecureHash val)

clear_overall_result_digest

public final void clear_overall_result_digest(int member)

sigshare

public final SigShare sigshare(int member)

have_sigshare

public final boolean have_sigshare(int member)

set_sigshare

public final void set_sigshare(int member,
                               SigShare share)

invalidate_sigshare

public final void invalidate_sigshare(int member)

sigshare_invalid

public final boolean sigshare_invalid(int member)

sigshare_unchecked

public final boolean sigshare_unchecked(int member)

sigshare_state

public final String sigshare_state(int member)

sigshare_count

public final int sigshare_count()

signed_overall_result

public final SignedQS signed_overall_result()

have_signed_overall_result

public final boolean have_signed_overall_result()

set_signed_overall_result

public final void set_signed_overall_result(SignedQS value)

toString

public String toString()
Overrides:
toString in class Object