All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.netflix.astyanax.recipes.locks.LockColumnStrategy Maven / Gradle / Ivy

There is a newer version: 3.8.0-bv14
Show newest version
package com.netflix.astyanax.recipes.locks;

import com.netflix.astyanax.model.ByteBufferRange;

/**
 * Strategy used by locking and uniqueness recipes to generate
 * and check lock columns
 * 
 * @author elandau
 *
 * @param 
 */
public interface LockColumnStrategy {
    /**
     * Return true if this is a lock column
     * @param c
     * @return
     */
    boolean isLockColumn(C c);
    
    /**
     * Return the ByteBuffer range to use when querying all lock
     * columns in a row
     * @return
     */
    ByteBufferRange getLockColumnRange();
    
    /**
     * Generate a unique lock column
     * @return
     */
    C generateLockColumn();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy