Tabnine Logo
DriverManagerConnectionProviderImpl$ValidationThreadFactory
Code IndexAdd Tabnine to your IDE (free)

How to use
DriverManagerConnectionProviderImpl$ValidationThreadFactory
in
org.hibernate.engine.jdbc.connections.internal

Best Java code snippets using org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl$ValidationThreadFactory (Showing top 2 results out of 315)

origin: hibernate/hibernate-orm

private void startIfNeeded() {
  if ( active ) {
    return;
  }
  statelock.writeLock().lock();
  try {
    if ( active ) {
      return;
    }
    executorService = Executors.newSingleThreadScheduledExecutor( new ValidationThreadFactory() );
    executorService.scheduleWithFixedDelay(
        pool::validate,
        validationInterval,
        validationInterval,
        TimeUnit.SECONDS
    );
    active = true;
  }
  finally {
    statelock.writeLock().unlock();
  }
}
origin: org.hibernate.orm/hibernate-core

private void startIfNeeded() {
  if ( active ) {
    return;
  }
  statelock.writeLock().lock();
  try {
    if ( active ) {
      return;
    }
    executorService = Executors.newSingleThreadScheduledExecutor( new ValidationThreadFactory() );
    executorService.scheduleWithFixedDelay(
        pool::validate,
        validationInterval,
        validationInterval,
        TimeUnit.SECONDS
    );
    active = true;
  }
  finally {
    statelock.writeLock().unlock();
  }
}
org.hibernate.engine.jdbc.connections.internalDriverManagerConnectionProviderImpl$ValidationThreadFactory

Most used methods

  • <init>

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSharedPreferences (Context)
  • getExternalFilesDir (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • Path (java.nio.file)
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • 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