org.apache.cassandra.net
Class CallbackInfo

java.lang.Object
  extended by org.apache.cassandra.net.CallbackInfo

public class CallbackInfo
extends java.lang.Object

Encapsulates the callback information. The ability to set the message is useful in cases for when a hint needs to be written due to a timeout in the response from a replica.


Field Summary
protected  IMessageCallback callback
           
protected  MessageOut<?> sentMessage
           
protected  IVersionedSerializer<?> serializer
           
protected  java.net.InetAddress target
           
 
Constructor Summary
CallbackInfo(java.net.InetAddress target, IMessageCallback callback, IVersionedSerializer<?> serializer)
          Create CallbackInfo without sent message
CallbackInfo(java.net.InetAddress target, IMessageCallback callback, MessageOut<?> sentMessage, IVersionedSerializer<?> serializer)
           
 
Method Summary
 boolean shouldHint()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

target

protected final java.net.InetAddress target

callback

protected final IMessageCallback callback

sentMessage

protected final MessageOut<?> sentMessage

serializer

protected final IVersionedSerializer<?> serializer
Constructor Detail

CallbackInfo

public CallbackInfo(java.net.InetAddress target,
                    IMessageCallback callback,
                    IVersionedSerializer<?> serializer)
Create CallbackInfo without sent message

Parameters:
target - target to send message
callback -
serializer - serializer to deserialize response message

CallbackInfo

public CallbackInfo(java.net.InetAddress target,
                    IMessageCallback callback,
                    MessageOut<?> sentMessage,
                    IVersionedSerializer<?> serializer)
Method Detail

shouldHint

public boolean shouldHint()
Returns:
TRUE if a hint should be written for this target and if the CL was achieved. FALSE otherwise. NOTE: Assumes it is only called after the write of "message" to "target" has timed out.


Copyright © 2013 The Apache Software Foundation