org.apache.cassandra.service.paxos

## Class ProposeCallback

- java.lang.Object
- - org.apache.cassandra.service.paxos.AbstractPaxosCallback<java.lang.Boolean>
  - - org.apache.cassandra.service.paxos.ProposeCallback

All Implemented Interfaces:
  IAsyncCallback<java.lang.Boolean>

    public class ProposeCallback
    extends AbstractPaxosCallback<java.lang.Boolean>

ProposeCallback has two modes of operation, controlled by the failFast parameter. In failFast mode, we will return a failure as soon as a majority of nodes reject the proposal. This is used when replaying a proposal from an earlier leader. Otherwise, we wait for either all replicas to reply or until we achieve the desired quorum. We continue to wait for all replicas even after we know we cannot succeed because we need to know if no node at all have accepted or if at least one has. In the former case, a proposer is guaranteed no-one will replay its value; in the latter we don't, so we must timeout in case another leader replays it before we can; see CASSANDRA-6013

### Field Summary

### Fields inherited from class org.apache.cassandra.service.paxos.AbstractPaxosCallback

`latch, targets`

### Fields inherited from interface org.apache.cassandra.net.IAsyncCallback

`isAlive`

### Constructor Summary

Constructors
Constructor and Description
`ProposeCallback(int totalTargets, int requiredTargets, boolean failFast, ConsistencyLevel consistency, long queryStartNanoTime)`

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `getAcceptCount()`
`boolean` `isFullyRefused()`
`boolean` `isSuccessful()`
`void` `response(MessageIn<java.lang.Boolean> msg)`

### Methods inherited from class org.apache.cassandra.service.paxos.AbstractPaxosCallback

`await, getResponseCount, isLatencyForSnitch`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.apache.cassandra.net.IAsyncCallback

`supportsBackPressure`

### Constructor Detail

#### ProposeCallback

    public ProposeCallback(int totalTargets,
                           int requiredTargets,
                           boolean failFast,
                           ConsistencyLevel consistency,
                           long queryStartNanoTime)

### Method Detail

#### response

    public void response(MessageIn<java.lang.Boolean> msg)

Parameters:
  `msg` - response received.

#### getAcceptCount

    public int getAcceptCount()

#### isSuccessful

    public boolean isSuccessful()

#### isFullyRefused

    public boolean isFullyRefused()