Examples of acquireUninterruptibly()


Examples of java.util.concurrent.Semaphore.acquireUninterruptibly()

      if (failed.get()) {
        fail("Concurrency bug");
        return;
      }
    }
    semaphore.acquireUninterruptibly(permits);
    System.out.println(System.currentTimeMillis() - start);
  }

}
View Full Code Here

Examples of java.util.concurrent.Semaphore.acquireUninterruptibly()

                new Thread(new Runnable() {
                  @Override
                  public void run() {
                    long start = System.currentTimeMillis();
                    while (System.currentTimeMillis() - start < 5000) {
                      semaphore.acquireUninterruptibly();
                      redisClient.publish("test", "hello");
                    }
                    redisClient.close();
                    done.countDown();
                  }
View Full Code Here

Examples of java.util.concurrent.Semaphore.acquireUninterruptibly()

        DocumentStore docStore = new MemoryDocumentStore();
        DocumentStore testStore = new TimingDocumentStoreWrapper(docStore) {
            @Override
            public void invalidateCache() {
                super.invalidateCache();
                semaphore.acquireUninterruptibly();
                semaphore.release();
            }
        };
        final DocumentNodeStore store1 = new DocumentMK.Builder().setAsyncDelay(0)
                .setDocumentStore(testStore).setClusterId(1).getNodeStore();
View Full Code Here

Examples of java.util.concurrent.Semaphore.acquireUninterruptibly()

        builder = store1.getRoot().builder();
        builder.child("node1");
        NodeState root = store1.merge(builder, EmptyHook.INSTANCE, null);

        semaphore.acquireUninterruptibly();
        Thread t = new Thread(new Runnable() {
            @Override
            public void run() {
                store1.runBackgroundOperations();
            }
View Full Code Here

Examples of java.util.concurrent.Semaphore.acquireUninterruptibly()

          }
        }
      });

      exactMatchProducer.send (m);
      ready.acquireUninterruptibly ();
    }
    catch ( JMSException e )
    {
      throw new BCSAPIException (e);
    }
View Full Code Here

Examples of java.util.concurrent.Semaphore.acquireUninterruptibly()

          }
        }
      });

      scanAccountProducer.send (m);
      ready.acquireUninterruptibly ();
    }
    catch ( JMSException e )
    {
      throw new BCSAPIException (e);
    }
View Full Code Here

Examples of java.util.concurrent.Semaphore.acquireUninterruptibly()

          }
        }
      }
    }));

    waitState.acquireUninterruptibly();
  }
}
View Full Code Here

Examples of java.util.concurrent.Semaphore.acquireUninterruptibly()

            semaphore.release();
          }
        }
       
      });
      semaphore.acquireUninterruptibly();
      if (exceptionRef.get() != null) {
        throw exceptionRef.get();
      }
    }
    else {
View Full Code Here

Examples of java.util.concurrent.Semaphore.acquireUninterruptibly()

          shutdownSemaphore.release();
        }
      } 
    }));
    //System.out.println("Acquiring Shutdown Semaphore");
    shutdownSemaphore.acquireUninterruptibly();
    //System.out.println("Acquired Shutdown Semaphore");
   
    try {
     
      if (eventThread != null) {
View Full Code Here

Examples of java.util.concurrent.Semaphore.acquireUninterruptibly()

        DocumentStore docStore = new MemoryDocumentStore();
        DocumentStore testStore = new TimingDocumentStoreWrapper(docStore) {
            @Override
            public void invalidateCache() {
                super.invalidateCache();
                semaphore.acquireUninterruptibly();
                semaphore.release();
            }
        };
        final DocumentNodeStore store1 = new DocumentMK.Builder().setAsyncDelay(0)
                .setDocumentStore(testStore).setClusterId(1).getNodeStore();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.