Tabnine Logo
MasterVisitedManager.clear
Code IndexAdd Tabnine to your IDE (free)

How to use
clear
method
in
org.apache.shardingsphere.core.routing.router.masterslave.MasterVisitedManager

Best Java code snippets using org.apache.shardingsphere.core.routing.router.masterslave.MasterVisitedManager.clear (Showing top 3 results out of 315)

origin: apache/incubator-shardingsphere

@Override
public final void close() throws SQLException {
  closed = true;
  HintManagerHolder.clear();
  MasterVisitedManager.clear();
  TransactionTypeHolder.clear();
  int connectionSize = cachedConnections.size();
  try {
    forceExecuteTemplateForClose.execute(cachedConnections.entries(), new ForceExecuteCallback<Entry<String, Connection>>() {
  
      @Override
      public void execute(final Entry<String, Connection> cachedConnections) throws SQLException {
        cachedConnections.getValue().close();
      }
    });
  } finally {
    cachedConnections.clear();
    rootInvokeHook.finish(connectionSize);
  }
}

origin: apache/incubator-shardingsphere

/**
 * Close cached connection.
 *
 * @param forceClose force close flag
 * @throws SQLException SQL exception
 */
public synchronized void close(final boolean forceClose) throws SQLException {
  Collection<SQLException> exceptions = new LinkedList<>();
  MasterVisitedManager.clear();
  exceptions.addAll(closeStatements());
  exceptions.addAll(closeResultSets());
  if (!stateHandler.isInTransaction() || forceClose) {
    exceptions.addAll(releaseConnections(forceClose));
  }
  stateHandler.doNotifyIfNecessary();
  throwSQLExceptionIfNecessary(exceptions);
}

origin: apache/incubator-shardingsphere

/**
 * Close cached connection.
 *
 * @param forceClose force close flag
 * @throws SQLException SQL exception
 */
public synchronized void close(final boolean forceClose) throws SQLException {
  Collection<SQLException> exceptions = new LinkedList<>();
  MasterVisitedManager.clear();
  exceptions.addAll(closeStatements());
  exceptions.addAll(closeResultSets());
  if (!stateHandler.isInTransaction() || forceClose) {
    exceptions.addAll(releaseConnections(forceClose));
  }
  stateHandler.doNotifyIfNecessary();
  throwSQLExceptionIfNecessary(exceptions);
}

org.apache.shardingsphere.core.routing.router.masterslaveMasterVisitedManagerclear

Javadoc

Clear master data source visited.

Popular methods of MasterVisitedManager

  • isMasterVisited
    Judge master data source visited in current thread.
  • setMasterVisited
    Set master data source visited in current thread.

Popular in Java

  • Making http post requests using okhttp
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getExternalFilesDir (Context)
  • addToBackStack (FragmentTransaction)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • Menu (java.awt)
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Top plugins for WebStorm
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