Tabnine Logo
ZkClient.doStart
Code IndexAdd Tabnine to your IDE (free)

How to use
doStart
method
in
me.hao0.antares.common.zk.ZkClient

Best Java code snippets using me.hao0.antares.common.zk.ZkClient.doStart (Showing top 2 results out of 315)

origin: ihaolin/antares

private void start() {
  if (started){
    return;
  }
  doStart();
}
origin: ihaolin/antares

public void restart(){
  try {
    boolean locked = RESTART_LOCK.tryLock(30, TimeUnit.SECONDS);
    if (!locked){
      log.warn("timeout to get the restart lock, maybe it's locked by another.");
      return;
    }
    if (client.getZookeeperClient().isConnected()){
      return;
    }
    if (client != null){
      // close old connection
      client.close();
    }
    doStart();
  } catch (InterruptedException e) {
    log.error("failed to get the restart lock, cause: {}", Throwables.getStackTraceAsString(e));
  } finally {
    RESTART_LOCK.unlock();
  }
}
me.hao0.antares.common.zkZkClientdoStart

Popular methods of ZkClient

  • checkExists
    Check the path exists or not
  • createEphemeral
    Create an ephemeral path
  • gets
    Get the children of the path
  • mkdirs
    Make directories if necessary
  • newChildWatcher
    new a watcher of path child
  • newClient
    Create a client instance
  • update
  • acquireLeader
    Acquire the leadership
  • create
    Create an persistent path
  • deleteIfExists
    Delete the node if the node exists
  • getString
    get the node data as string
  • newLock
    lock the path
  • getString,
  • newLock,
  • newNodeWatcher,
  • shutdown,
  • <init>,
  • client,
  • createEphemeralSequential,
  • createIfNotExists,
  • createSequential,
  • delete

Popular in Java

  • Making http requests using okhttp
  • startActivity (Activity)
  • getResourceAsStream (ClassLoader)
  • notifyDataSetChanged (ArrayAdapter)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • From CI to AI: The AI layer in your organization
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