de.zib.scalaris
Class DeleteResult

java.lang.Object
  extended by de.zib.scalaris.DeleteResult

public class DeleteResult
extends Object

Stores the result of a delete operation.

Since:
2.2
Version:
3.19
Author:
Nico Kruber, kruber@zib.de
See Also:
ReplicatedDHT.delete(String)

Field Summary
 int locks_set
          Skipped replicas because locks were set.
 int ok
          Number of successfully deleted replicas.
 int undef
          Skipped replicas because they did not exist.
 
Constructor Summary
DeleteResult(OtpErlangList list)
          Creates a delete state object by converting the result list returned from erlang.
 
Method Summary
 boolean hasDeletedAll(Connection conn)
          Checks whether the delete operation has successfully deleted all replicas (replicas which did not exist are counted as successfully deleted as well).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ok

public int ok
Number of successfully deleted replicas.


locks_set

public int locks_set
Skipped replicas because locks were set.


undef

public int undef
Skipped replicas because they did not exist.

Constructor Detail

DeleteResult

public DeleteResult(OtpErlangList list)
             throws UnknownException
Creates a delete state object by converting the result list returned from erlang.

Parameters:
list - the list to convert
Throws:
UnknownException - is thrown if an unknown reason was encountered
Method Detail

hasDeletedAll

public boolean hasDeletedAll(Connection conn)
                      throws ConnectionException
Checks whether the delete operation has successfully deleted all replicas (replicas which did not exist are counted as successfully deleted as well). If not, the delete needs to be executed again (see ReplicatedDHT.delete(com.ericsson.otp.erlang.OtpErlangString, int).

Parameters:
conn - a connection to Scalaris to find out the current replication degree
Returns:
whether all replicas were deleted or not
Throws:
ConnectionException - if the connection is not active or a communication error occurs or an exit signal was received or the remote node sends a message containing an invalid cookie
Since:
3.19