com.sleepycat.je.rep.elections
Class Elections.ElectionListener

java.lang.Object
  extended by com.sleepycat.je.rep.elections.Elections.ElectionListener
All Implemented Interfaces:
Learner.Listener
Enclosing class:
Elections

static class Elections.ElectionListener
extends Object
implements Learner.Listener

Used to short-circuit Proposal retries if a new election has completed since the time this election was initiated.


Constructor Summary
Elections.ElectionListener()
           
 
Method Summary
 CountDownLatch getElectionLatch()
          Used during shutdown only
 void notify(Proposer.Proposal proposal, Protocol.Value value)
          The Listener protocol announcing election results.
 CountDownLatch setLatch()
          Returns a new latch to be associated with the RetryPredicate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Elections.ElectionListener

Elections.ElectionListener()
Method Detail

setLatch

public CountDownLatch setLatch()
Returns a new latch to be associated with the RetryPredicate.


getElectionLatch

public CountDownLatch getElectionLatch()
Used during shutdown only

Returns:
the latch on which elections wait

notify

public void notify(Proposer.Proposal proposal,
                   Protocol.Value value)
The Listener protocol announcing election results.

Specified by:
notify in interface Learner.Listener


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