Tabnine Logo
SinkQueue$Consumer
Code IndexAdd Tabnine to your IDE (free)

How to use
SinkQueue$Consumer
in
org.apache.hadoop.metrics2.impl

Best Java code snippets using org.apache.hadoop.metrics2.impl.SinkQueue$Consumer (Showing top 10 results out of 315)

origin: io.prestosql.hadoop/hadoop-apache

/**
 * Consume all the elements, will block if queue is empty
 * @param consumer  the consumer callback object
 * @throws InterruptedException
 */
void consumeAll(Consumer<T> consumer) throws InterruptedException {
 waitForData();
 try {
  for (int i = size(); i-- > 0; ) {
   consumer.consume(front()); // can take forever
   _dequeue();
  }
 }
 finally {
  clearConsumerLock();
 }
}
origin: ch.cern.hadoop/hadoop-common

/**
 * Consume all the elements, will block if queue is empty
 * @param consumer  the consumer callback object
 * @throws InterruptedException
 */
void consumeAll(Consumer<T> consumer) throws InterruptedException {
 waitForData();
 try {
  for (int i = size(); i-- > 0; ) {
   consumer.consume(front()); // can take forever
   _dequeue();
  }
 }
 finally {
  clearConsumerLock();
 }
}
origin: io.hops/hadoop-common

/**
 * Consume all the elements, will block if queue is empty
 * @param consumer  the consumer callback object
 * @throws InterruptedException
 */
void consumeAll(Consumer<T> consumer) throws InterruptedException {
 waitForData();
 try {
  for (int i = size(); i-- > 0; ) {
   consumer.consume(front()); // can take forever
   _dequeue();
  }
 }
 finally {
  clearConsumerLock();
 }
}
origin: io.hops/hadoop-common

/**
 * Consume one element, will block if queue is empty
 * Only one consumer at a time is allowed
 * @param consumer  the consumer callback object
 */
void consume(Consumer<T> consumer) throws InterruptedException {
 T e = waitForData();
 try {
  consumer.consume(e);  // can take forever
  _dequeue();
 }
 finally {
  clearConsumerLock();
 }
}
origin: io.prestosql.hadoop/hadoop-apache

/**
 * Consume one element, will block if queue is empty
 * Only one consumer at a time is allowed
 * @param consumer  the consumer callback object
 */
void consume(Consumer<T> consumer) throws InterruptedException {
 T e = waitForData();
 try {
  consumer.consume(e);  // can take forever
  _dequeue();
 }
 finally {
  clearConsumerLock();
 }
}
origin: com.github.jiayuhan-it/hadoop-common

/**
 * Consume one element, will block if queue is empty
 * Only one consumer at a time is allowed
 * @param consumer  the consumer callback object
 */
void consume(Consumer<T> consumer) throws InterruptedException {
 T e = waitForData();
 try {
  consumer.consume(e);  // can take forever
  _dequeue();
 }
 finally {
  clearConsumerLock();
 }
}
origin: com.github.jiayuhan-it/hadoop-common

/**
 * Consume all the elements, will block if queue is empty
 * @param consumer  the consumer callback object
 * @throws InterruptedException
 */
void consumeAll(Consumer<T> consumer) throws InterruptedException {
 waitForData();
 try {
  for (int i = size(); i-- > 0; ) {
   consumer.consume(front()); // can take forever
   _dequeue();
  }
 }
 finally {
  clearConsumerLock();
 }
}
origin: ch.cern.hadoop/hadoop-common

/**
 * Consume one element, will block if queue is empty
 * Only one consumer at a time is allowed
 * @param consumer  the consumer callback object
 */
void consume(Consumer<T> consumer) throws InterruptedException {
 T e = waitForData();
 try {
  consumer.consume(e);  // can take forever
  _dequeue();
 }
 finally {
  clearConsumerLock();
 }
}
origin: org.apache.hadoop/hadoop-common

/**
 * Consume all the elements, will block if queue is empty
 * @param consumer  the consumer callback object
 * @throws InterruptedException
 */
void consumeAll(Consumer<T> consumer) throws InterruptedException {
 waitForData();
 try {
  for (int i = size(); i-- > 0; ) {
   consumer.consume(front()); // can take forever
   _dequeue();
  }
 }
 finally {
  clearConsumerLock();
 }
}
origin: org.apache.hadoop/hadoop-common

/**
 * Consume one element, will block if queue is empty
 * Only one consumer at a time is allowed
 * @param consumer  the consumer callback object
 */
void consume(Consumer<T> consumer) throws InterruptedException {
 T e = waitForData();
 try {
  consumer.consume(e);  // can take forever
  _dequeue();
 }
 finally {
  clearConsumerLock();
 }
}
org.apache.hadoop.metrics2.implSinkQueue$Consumer

Most used methods

  • consume

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getSharedPreferences (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getApplicationContext (Context)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Reference (javax.naming)
  • JOptionPane (javax.swing)
  • Top plugins for Android Studio
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