Example usage for java.util.concurrent.locks StampedLock StampedLock

List of usage examples for java.util.concurrent.locks StampedLock StampedLock

Introduction

In this page you can find the example usage for java.util.concurrent.locks StampedLock StampedLock.

Prototype

public StampedLock() 

Source Link

Document

Creates a new lock, initially in unlocked state.

Usage

From source file:org.corfudb.client.CorfuDBClient.java

/**
 * Constructor. Generates an instance of a CorfuDB client, which
 * manages views of the CorfuDB infrastructure and provides interfaces
 * for clients to access./* w w w  . ja va  2  s .c  o m*/
 *
 * @param configurationString   A configuration string which describes how to reach the \
 *                              CorfuDB instance. This is usually a http address for a \
 *                              configuration master.
 */
public CorfuDBClient(String configurationString) {
    this.configurationString = configurationString;

    viewLock = new StampedLock();
    viewUpdatePending = new BooleanLock();
    viewUpdatePending.lock = true;
    viewManagerThread = getViewManagerThread();
}