Searched defs:permits (Results 1 - 5 of 5) sorted by relevance

/libcore/ojluni/src/main/java/java/security/
H A DAlgorithmConstraints.java69 public boolean permits(Set<CryptoPrimitive> primitives, method in interface:AlgorithmConstraints
87 public boolean permits(Set<CryptoPrimitive> primitives, Key key); method in interface:AlgorithmConstraints
105 public boolean permits(Set<CryptoPrimitive> primitives, method in interface:AlgorithmConstraints
/libcore/ojluni/src/main/java/java/util/concurrent/
H A DSemaphore.java43 * permits. Each {@link #acquire} blocks if necessary until a permit is
111 * available, or zero permits available. When used in this way, the
120 * guarantees about the order in which threads acquire permits. In
126 * #acquire() acquire} methods are selected to obtain permits in the order in
134 * honor the fairness setting, but will take any permits that are
145 * permits at a time. These methods are generally more efficient and
148 * thread B invokes {@code s.acquire(2)}, and two permits become
169 * to represent permits. Subclassed into fair and nonfair
175 Sync(int permits) { argument
176 setState(permits);
230 NonfairSync(int permits) argument
245 FairSync(int permits) argument
270 Semaphore(int permits) argument
285 Semaphore(int permits, boolean fair) argument
473 acquire(int permits) argument
502 acquireUninterruptibly(int permits) argument
534 tryAcquire(int permits) argument
589 tryAcquire(int permits, long timeout, TimeUnit unit) argument
617 release(int permits) argument
[all...]
/libcore/ojluni/src/main/java/sun/security/util/
H A DDisabledAlgorithmConstraints.java96 final public boolean permits(Set<CryptoPrimitive> primitives, method in class:DisabledAlgorithmConstraints
111 final public boolean permits(Set<CryptoPrimitive> primitives, Key key) { method in class:DisabledAlgorithmConstraints
120 final public boolean permits(Set<CryptoPrimitive> primitives, method in class:DisabledAlgorithmConstraints
137 public final void permits(Set<CryptoPrimitive> primitives, method in class:DisabledAlgorithmConstraints
146 public final void permits(Set<CryptoPrimitive> primitives, method in class:DisabledAlgorithmConstraints
173 if (!permits(primitives, algorithm, parameters)) {
179 if (!permits(primitives, key.getAlgorithm(), null)) {
184 return algorithmConstraints.permits(key);
198 if (!permits(primitives, algorithm, null)) {
206 if (!permits(primitive
324 public boolean permits(Key key) { method in class:DisabledAlgorithmConstraints.Constraints
342 public void permits(CertConstraintParameters cp) method in class:DisabledAlgorithmConstraints.Constraints
413 public boolean permits(Key key) { method in class:DisabledAlgorithmConstraints.Constraint
423 public abstract void permits(CertConstraintParameters cp) method in class:DisabledAlgorithmConstraints.Constraint
441 public void permits(CertConstraintParameters cp) method in class:DisabledAlgorithmConstraints.jdkCAConstraint
514 public void permits(CertConstraintParameters cp) method in class:DisabledAlgorithmConstraints.KeySizeConstraint
530 public boolean permits(Key key) { method in class:DisabledAlgorithmConstraints.KeySizeConstraint
[all...]
/libcore/jsr166-tests/src/test/java/jsr166/
H A DSemaphoreTest.java36 PublicSemaphore(int permits) { super(permits); } argument
37 PublicSemaphore(int permits, boolean fair) { super(permits, fair); } argument
107 void acquire(Semaphore s, int permits) throws InterruptedException {
108 s.acquire(permits);
117 void acquire(Semaphore s, int permits) {
118 s.acquireUninterruptibly(permits);
127 void acquire(Semaphore s, int permits) {
128 assertTrue(s.tryAcquire(permits));
149 acquire(Semaphore s, int permits) argument
[all...]
/libcore/ojluni/src/main/java/java/util/stream/
H A DStreamSpliterators.java909 private final AtomicLong permits; field in class:StreamSpliterators.UnorderedSliceSpliterator
915 this.permits = new AtomicLong(limit >= 0 ? skip + limit : skip);
922 this.permits = parent.permits;
943 // permits never increase, and don't decrease below zero
946 remainingPermits = permits.get();
951 !permits.compareAndSet(remainingPermits, remainingPermits - grabbing));
963 /** Call to check if permits might be available before acquiring data */
965 if (permits.get() > 0)
972 // Stop splitting when there are no more limit permits
[all...]

Completed in 806 milliseconds