Tabnine Logo
Fifo.take
Code IndexAdd Tabnine to your IDE (free)

How to use
take
method
in
xapi.collect.api.Fifo

Best Java code snippets using xapi.collect.api.Fifo.take (Showing top 4 results out of 315)

origin: net.wetheinter/xapi-core-api

public void set(T value) {
 while(!handlers.isEmpty()){
  handlers.take().set(value);
 }
};
/**
origin: net.wetheinter/xapi-core-api

 @Override
 public void set(X value) {
  ProvidesValue<ReceivesValue<X>> local;
  while((local=providers.take())!=null){
   local.get().set(value);
  }
  local = null;
 }
};
origin: net.wetheinter/xapi-core-api

@Override
public void remove() {
 while(!handles.isEmpty()){
  RemovalHandler handle = handles.take();
  handle.remove();
 }
}
/**
origin: net.wetheinter/xapi-gwt-inject

protected final void apply(T value){
 Fifo<ReceivesValue<T>> pending = pending();
 while(!pending.isEmpty())
  pending.take().set(value);
}
xapi.collect.apiFifotake

Javadoc

Analagous to poll(); retrieves and removes head. We avoid the use of standard queue naming methods, in case an api to be injected uses Object instead of <Generic>

Popular methods of Fifo

  • give
    Analagous to add(), however, we do not use the standard naming convention, to avoid interface clashe
  • forEach
  • isEmpty
    Fastest way to tell if the queue is drained.
  • clear
    Removes all items in the queue. head = tail;
  • join
  • remove
    Manually remove the item from queue. O(n) performance.
  • contains
    Check if this queue contains the given item. O(n) performance. You may want to use a Set unless you
  • size
    Return a count of items in the queue. Default implementation uses a counter; subclasses may have O(n

Popular in Java

  • Running tasks concurrently on multiple threads
  • getContentResolver (Context)
  • getSystemService (Context)
  • startActivity (Activity)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • JTextField (javax.swing)
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Best IntelliJ plugins
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