congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
ReentrantDistributedLock.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.apache.twill.internal.zookeeper.ReentrantDistributedLock
constructor

Best Java code snippets using org.apache.twill.internal.zookeeper.ReentrantDistributedLock.<init> (Showing top 4 results out of 315)

origin: org.apache.twill/twill-core

@Override
public Lock createLock(String name) {
 return new ReentrantDistributedLock(zkClient, "/lock/" + name);
}
origin: apache/twill

@Override
public Lock createLock(String name) {
 return new ReentrantDistributedLock(zkClient, "/lock/" + name);
}
origin: co.cask.cdap/cdap-data-fabric

@Override
protected Lock getLock(StreamId streamId) {
 // It's ok to create new locks every time as it's backed by ZK for distributed lock
 ZKClient lockZKClient = ZKClients.namespace(zkClient, "/" + Constants.Service.STREAMS + "/locks");
 return new ReentrantDistributedLock(lockZKClient, streamId.toString());
}
origin: cdapio/cdap

this.logAppenderInitializer = injector.getInstance(LogAppenderInitializer.class);
this.zkClient = injector.getInstance(ZKClientService.class);
this.shutdownLock = new ReentrantDistributedLock(zkClient, "/lock/" + Constants.Service.MASTER_SERVICES);
org.apache.twill.internal.zookeeperReentrantDistributedLock<init>

Javadoc

Creates a distributed lock instance.

Popular methods of ReentrantDistributedLock

  • acquire
    Acquires a distributed lock through ZooKeeper.

Popular in Java

  • Parsing JSON documents to java classes using gson
  • setRequestProperty (URLConnection)
  • onRequestPermissionsResult (Fragment)
  • getSupportFragmentManager (FragmentActivity)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • Option (scala)
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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