Codota Logo
CondVar
Code IndexAdd Codota to your IDE (free)

How to use
CondVar
in
edu.emory.mathcs.backport.java.util.concurrent.locks

Best Java code snippets using edu.emory.mathcs.backport.java.util.concurrent.locks.CondVar (Showing top 15 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Connection c =
  • Codota IconDataSource dataSource;dataSource.getConnection()
  • Codota IconString url;DriverManager.getConnection(url)
  • Codota IconIdentityDatabaseUtil.getDBConnection()
  • Smart code suggestions by Codota
}
origin: edu.emory.mathcs.backport/com.springsource.edu.emory.mathcs.backport

return new CondVar(this);
origin: backport-util-concurrent/backport-util-concurrent

/**
 * Returns an estimate of the number of threads waiting on the
 * given condition associated with this lock. Note that because
 * timeouts and interrupts may occur at any time, the estimate
 * serves only as an upper bound on the actual number of waiters.
 * This method is designed for use in monitoring of the system
 * state, not for synchronization control.
 *
 * @param condition the condition
 * @return the estimated number of waiting threads
 * @throws IllegalMonitorStateException if this lock is not held
 * @throws IllegalArgumentException if the given condition is
 *         not associated with this lock
 * @throws NullPointerException if the condition is null
 */
public int getWaitQueueLength(Condition condition) {
  return asCondVar(condition).getWaitQueueLength();
}
origin: edu.emory.mathcs.backport/com.springsource.edu.emory.mathcs.backport

/**
 * Returns a collection containing those threads that may be
 * waiting on the given condition associated with this lock.
 * Because the actual set of threads may change dynamically while
 * constructing this result, the returned collection is only a
 * best-effort estimate. The elements of the returned collection
 * are in no particular order.  This method is designed to
 * facilitate construction of subclasses that provide more
 * extensive condition monitoring facilities.
 *
 * @param condition the condition
 * @return the collection of threads
 * @throws IllegalMonitorStateException if this lock is not held
 * @throws IllegalArgumentException if the given condition is
 *         not associated with this lock
 * @throws NullPointerException if the condition is null
 */
protected Collection getWaitingThreads(Condition condition) {
  return asCondVar(condition).getWaitingThreads();
}
origin: edu.emory.mathcs.backport/com.springsource.edu.emory.mathcs.backport

/**
 * Queries whether any threads are waiting on the given condition
 * associated with this lock. Note that because timeouts and
 * interrupts may occur at any time, a {@code true} return does
 * not guarantee that a future {@code signal} will awaken any
 * threads.  This method is designed primarily for use in
 * monitoring of the system state.
 *
 * @param condition the condition
 * @return {@code true} if there are any waiting threads
 * @throws IllegalMonitorStateException if this lock is not held
 * @throws IllegalArgumentException if the given condition is
 *         not associated with this lock
 * @throws NullPointerException if the condition is null
 */
public boolean hasWaiters(Condition condition) {
  return asCondVar(condition).hasWaiters();
}
origin: backport-util-concurrent/backport-util-concurrent-java12

/**
 * Queries whether any threads are waiting on the given condition
 * associated with this lock. Note that because timeouts and
 * interrupts may occur at any time, a {@code true} return does
 * not guarantee that a future {@code signal} will awaken any
 * threads.  This method is designed primarily for use in
 * monitoring of the system state.
 *
 * @param condition the condition
 * @return {@code true} if there are any waiting threads
 * @throws IllegalMonitorStateException if this lock is not held
 * @throws IllegalArgumentException if the given condition is
 *         not associated with this lock
 * @throws NullPointerException if the condition is null
 */
public boolean hasWaiters(Condition condition) {
  return asCondVar(condition).hasWaiters();
}
origin: backport-util-concurrent/backport-util-concurrent

return new CondVar(this);
origin: edu.emory.mathcs.backport/com.springsource.edu.emory.mathcs.backport

/**
 * Returns an estimate of the number of threads waiting on the
 * given condition associated with this lock. Note that because
 * timeouts and interrupts may occur at any time, the estimate
 * serves only as an upper bound on the actual number of waiters.
 * This method is designed for use in monitoring of the system
 * state, not for synchronization control.
 *
 * @param condition the condition
 * @return the estimated number of waiting threads
 * @throws IllegalMonitorStateException if this lock is not held
 * @throws IllegalArgumentException if the given condition is
 *         not associated with this lock
 * @throws NullPointerException if the condition is null
 */
public int getWaitQueueLength(Condition condition) {
  return asCondVar(condition).getWaitQueueLength();
}
origin: backport-util-concurrent/backport-util-concurrent

/**
 * Queries whether any threads are waiting on the given condition
 * associated with this lock. Note that because timeouts and
 * interrupts may occur at any time, a {@code true} return does
 * not guarantee that a future {@code signal} will awaken any
 * threads.  This method is designed primarily for use in
 * monitoring of the system state.
 *
 * @param condition the condition
 * @return {@code true} if there are any waiting threads
 * @throws IllegalMonitorStateException if this lock is not held
 * @throws IllegalArgumentException if the given condition is
 *         not associated with this lock
 * @throws NullPointerException if the condition is null
 */
public boolean hasWaiters(Condition condition) {
  return asCondVar(condition).hasWaiters();
}
origin: backport-util-concurrent/backport-util-concurrent

/**
 * Returns a collection containing those threads that may be
 * waiting on the given condition associated with this lock.
 * Because the actual set of threads may change dynamically while
 * constructing this result, the returned collection is only a
 * best-effort estimate. The elements of the returned collection
 * are in no particular order.  This method is designed to
 * facilitate construction of subclasses that provide more
 * extensive condition monitoring facilities.
 *
 * @param condition the condition
 * @return the collection of threads
 * @throws IllegalMonitorStateException if this lock is not held
 * @throws IllegalArgumentException if the given condition is
 *         not associated with this lock
 * @throws NullPointerException if the condition is null
 */
protected Collection getWaitingThreads(Condition condition) {
  return asCondVar(condition).getWaitingThreads();
}
origin: backport-util-concurrent/backport-util-concurrent-java12

return new CondVar(this);
origin: backport-util-concurrent/backport-util-concurrent-java12

/**
 * Returns an estimate of the number of threads waiting on the
 * given condition associated with this lock. Note that because
 * timeouts and interrupts may occur at any time, the estimate
 * serves only as an upper bound on the actual number of waiters.
 * This method is designed for use in monitoring of the system
 * state, not for synchronization control.
 *
 * @param condition the condition
 * @return the estimated number of waiting threads
 * @throws IllegalMonitorStateException if this lock is not held
 * @throws IllegalArgumentException if the given condition is
 *         not associated with this lock
 * @throws NullPointerException if the condition is null
 */
public int getWaitQueueLength(Condition condition) {
  return asCondVar(condition).getWaitQueueLength();
}
origin: backport-util-concurrent/backport-util-concurrent-java12

/**
 * Returns a collection containing those threads that may be
 * waiting on the given condition associated with this lock.
 * Because the actual set of threads may change dynamically while
 * constructing this result, the returned collection is only a
 * best-effort estimate. The elements of the returned collection
 * are in no particular order.  This method is designed to
 * facilitate construction of subclasses that provide more
 * extensive condition monitoring facilities.
 *
 * @param condition the condition
 * @return the collection of threads
 * @throws IllegalMonitorStateException if this lock is not held
 * @throws IllegalArgumentException if the given condition is
 *         not associated with this lock
 * @throws NullPointerException if the condition is null
 */
protected Collection getWaitingThreads(Condition condition) {
  return asCondVar(condition).getWaitingThreads();
}
origin: backport-util-concurrent/backport-util-concurrent

return isFair() ? (Condition)new FIFOCondVar(this) : new CondVar(this);
origin: edu.emory.mathcs.backport/com.springsource.edu.emory.mathcs.backport

return isFair() ? (Condition)new FIFOCondVar(this) : new CondVar(this);
origin: backport-util-concurrent/backport-util-concurrent-java12

return isFair() ? (Condition)new FIFOCondVar(this) : new CondVar(this);
edu.emory.mathcs.backport.java.util.concurrent.locksCondVar

Most used methods

  • <init>
    Create a new CondVar that relies on the given mutual exclusion lock.
  • getWaitQueueLength
  • getWaitingThreads
  • hasWaiters

Popular in Java

  • Start an intent from android
  • onRequestPermissionsResult (Fragment)
  • setContentView (Activity)
  • getApplicationContext (Context)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate(i
  • HashSet (java.util)
    This class implements the Set interface, backed by a hash table (actually a HashMap instance). It m
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now