public class

DedicatedMultiRowUniquenessConstraint

extends Object
implements UniquenessConstraint
java.lang.Object
   ↳ com.netflix.astyanax.recipes.uniqueness.DedicatedMultiRowUniquenessConstraint<C>

Class Overview

Multi-row uniqueness constraint where all involved column families are dedicated only to uniquness constraint.

Summary

Public Constructors
DedicatedMultiRowUniquenessConstraint(Keyspace keyspace, uniqueColumnSupplier)
Public Methods
void acquire()
Acquire the row(s) for uniqueness.
void acquireAndMutate(MutationBatch other)
Acquire the uniqueness constraint and apply the final mutation if the row if found to be unique
C getLockColumn()
Column<C> getUniqueColumn()
@return
void release()
Release the uniqueness lock for this row.
DedicatedMultiRowUniquenessConstraint<C> withConsistencyLevel(ConsistencyLevel consistencyLevel)
Consistency level used
<K> DedicatedMultiRowUniquenessConstraint<C> withRow(ColumnFamily<K, C> columnFamily, K rowKey)
Add a row to the set of rows being tested for uniqueness
DedicatedMultiRowUniquenessConstraint<C> withTtl(Integer ttl)
TTL to use for the uniquness operation.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.netflix.astyanax.recipes.uniqueness.UniquenessConstraint

Public Constructors

public DedicatedMultiRowUniquenessConstraint (Keyspace keyspace, uniqueColumnSupplier)

Public Methods

public void acquire ()

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.

public void acquireAndMutate (MutationBatch other)

Acquire the uniqueness constraint and apply the final mutation if the row if found to be unique

public C getLockColumn ()

public Column<C> getUniqueColumn ()

@return

Throws
Exception

public void release ()

Release the uniqueness lock for this row. Only call this when you no longer need the uniqueness lock

Throws
Exception

public DedicatedMultiRowUniquenessConstraint<C> withConsistencyLevel (ConsistencyLevel consistencyLevel)

Consistency level used

public DedicatedMultiRowUniquenessConstraint<C> withRow (ColumnFamily<K, C> columnFamily, K rowKey)

Add a row to the set of rows being tested for uniqueness

public DedicatedMultiRowUniquenessConstraint<C> withTtl (Integer ttl)

TTL to use for the uniquness operation. This is the TTL for the columns to expire in the event of a client crash before the uniqueness can be committed