com.netflix.astyanax.recipes.uniqueness
Interface UniquenessConstraint

All Known Implementing Classes:
ColumnPrefixUniquenessConstraint, MultiRowUniquenessConstraint, RowUniquenessConstraint

public interface UniquenessConstraint


Method Summary
 void acquire()
          Acquire the row(s) for uniqueness.
 void acquireAndMutate(MutationBatch mutation)
          Acquire the uniqueness constraint and apply the final mutation if the row if found to be unique
 void release()
          Release the uniqueness lock for this row.
 

Method Detail

acquire

void acquire()
             throws NotUniqueException,
                    Exception
Acquire the row(s) for uniqueness. Call release() when the uniqueness on the row(s) is no longer needed, such as when deleting the rows.

Throws:
NotUniqueException
Exception

release

void release()
             throws Exception
Release the uniqueness lock for this row. Only call this when you no longer need the uniqueness lock

Throws:
Exception

acquireAndMutate

void acquireAndMutate(MutationBatch mutation)
                      throws NotUniqueException,
                             Exception
Acquire the uniqueness constraint and apply the final mutation if the row if found to be unique

Parameters:
mutation -
Throws:
NotUniqueException
Exception


Copyright © 2012. All Rights Reserved.