congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Lock
Code IndexAdd Tabnine to your IDE (free)

How to use
Lock
in
com.moz.fiji.schema.util

Best Java code snippets using com.moz.fiji.schema.util.Lock (Showing top 12 results out of 315)

origin: com.moz.fiji.schema/fiji-schema

 /** {@inheritDoc} */
 @Override
 public void close() throws IOException {
  mFiji.release();
  mLock.close();
  mZKClient.close();
 }
}
origin: com.moz.fiji.schema/fiji-schema

/** {@inheritDoc} */
@Override
public void lock() throws IOException {
 LOG.debug("Locking permissions for instance: '{}'.", mInstanceUri);
 boolean lockSuccessful = mLock.lock(LOCK_TIMEOUT);
 if (!lockSuccessful) {
  throw new FijiSecurityException("Acquiring lock on instance " + mInstanceUri
    + " timed out after " + LOCK_TIMEOUT + " seconds.");
 }
}
origin: com.moz.fiji.schema/fiji-schema

/** {@inheritDoc} */
@Override
public void unlock() throws IOException {
 LOG.debug("Unlocking permissions for instance: '{}'.", mInstanceUri);
 mLock.unlock();
}
origin: com.moz.fiji.schema/fiji-schema

Preconditions.checkState(state == State.OPEN,
  "Cannot backup SchemaTable instance in state %s.", state);
mZKLock.lock();
List<SchemaTableEntry> entries = Lists.newArrayList();
try {
 mZKLock.unlock();
origin: com.moz.fiji.schema/fiji-schema-cassandra

lock.lock();
try {
 final NavigableMap<Long, FijiTableLayout> layoutMap =
 lock.unlock();
 lock.close();
origin: com.moz.fiji.schema/fiji-schema-cassandra

Preconditions.checkState(state == State.OPEN,
  "Cannot backup SchemaTable instance in state %s.", state);
mZKLock.lock();
List<SchemaTableEntry> entries = Lists.newArrayList();
try {
 mZKLock.unlock();
origin: com.moz.fiji.schema/fiji-schema

lock.lock();
try {
 final NavigableMap<Long, FijiTableLayout> layoutMap =
 lock.unlock();
 lock.close();
origin: com.moz.fiji.schema/fiji-schema-cassandra

Preconditions.checkState(state == State.OPEN,
  "Cannot restore backup to SchemaTable instance in state %s.", state);
mZKLock.lock();
try {
 flush();
} finally {
 mZKLock.unlock();
origin: com.moz.fiji.schema/fiji-schema-cassandra

/** {@inheritDoc} */
@Override
public synchronized void close() throws IOException {
 flush();
 final State oldState = mState.getAndSet(State.CLOSED);
 Preconditions.checkState(oldState == State.OPEN,
   "Cannot close SchemaTable instance in state %s.", oldState);
 ResourceTracker.get().unregisterResource(this);
 mZKLock.close();
 mZKClient.close();
}
origin: com.moz.fiji.schema/fiji-schema

mZKLock.lock();
try {
 final SchemaTableEntry existingAvroEntry = loadFromHashTable(schemaHash);
 mZKLock.unlock();
origin: com.moz.fiji.schema/fiji-schema

Preconditions.checkState(state == State.OPEN,
  "Cannot restore backup to SchemaTable instance in state %s.", state);
mZKLock.lock();
try {
 flush();
} finally {
 mZKLock.unlock();
origin: com.moz.fiji.schema/fiji-schema-cassandra

mZKLock.lock();
try {
 final SchemaTableEntry existingAvroEntry = loadFromHashTable(schemaHash);
 mZKLock.unlock();
com.moz.fiji.schema.utilLock

Javadoc

Lock interface.

Most used methods

  • close
  • lock
    Acquires the lock.
  • unlock
    Releases the lock.

Popular in Java

  • Updating database using SQL prepared statement
  • getSystemService (Context)
  • getContentResolver (Context)
  • startActivity (Activity)
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now