Tabnine Logo
OverwritingCircularBuffer.removeFirst
Code IndexAdd Tabnine to your IDE (free)

How to use
removeFirst
method
in
de.huxhorn.sulky.buffers.OverwritingCircularBuffer

Best Java code snippets using de.huxhorn.sulky.buffers.OverwritingCircularBuffer.removeFirst (Showing top 7 results out of 315)

origin: de.huxhorn.sulky/de.huxhorn.sulky.buffers

@Override
public E removeFirst()
{
  lock.lock();
  try
  {
    return events.removeFirst();
  }
  finally
  {
    lock.unlock();
  }
}
origin: huxi/sulky

@Override
public E removeFirst()
{
  lock.lock();
  try
  {
    return events.removeFirst();
  }
  finally
  {
    lock.unlock();
  }
}
origin: de.huxhorn.sulky/de.huxhorn.sulky.buffers

@Override
public List<E> removeAll()
{
  long availableElements = getAvailableElements();
  List<E> result = new ArrayList<>((int) availableElements);
  for(int i = 0; i < availableElements; i++)
  {
    result.add(removeFirst());
  }
  return result;
}
origin: huxi/sulky

@Override
public List<E> removeAll()
{
  long availableElements = getAvailableElements();
  List<E> result = new ArrayList<>((int) availableElements);
  for(int i = 0; i < availableElements; i++)
  {
    result.add(removeFirst());
  }
  return result;
}
origin: de.huxhorn.sulky/de.huxhorn.sulky.buffers

private void internalAdd(Object element)
{
  if(isFull())
  {
    removeFirst();
    overflowCounter++;
  }
  size++;
  array[endIndex] = element;
  endIndex++;
  if(endIndex == bufferSize)
  {
    endIndex = 0;
  }
  if(startIndex == endIndex)
  {
    full = true;
  }
}
origin: huxi/sulky

private void internalAdd(Object element)
{
  if(isFull())
  {
    removeFirst();
    overflowCounter++;
  }
  size++;
  array[endIndex] = element;
  endIndex++;
  if(endIndex == bufferSize)
  {
    endIndex = 0;
  }
  if(startIndex == endIndex)
  {
    full = true;
  }
}
origin: huxi/sulky

  if(logger.isDebugEnabled()) logger.debug("Size before removal of element #{}: {}", i, impl.getAvailableElements());
  Long removeValue = impl.removeFirst();
  if(logger.isDebugEnabled()) logger.debug("Size after removal of element #{}: {}", i, impl.getAvailableElements());
Long removeValue = impl.removeFirst();
if(logger.isInfoEnabled()) logger.info("Element #{}: removeValue={}", expectedElementCount, removeValue);
de.huxhorn.sulky.buffersOverwritingCircularBufferremoveFirst

Popular methods of OverwritingCircularBuffer

  • <init>
  • add
  • get
  • getAvailableElements
  • getBufferSize
  • getRelative
  • getSize
  • isEmpty
  • isFull
  • iterator
  • removeAll
  • reset
  • removeAll,
  • reset,
  • clear,
  • internalAdd,
  • setRelative,
  • addAll,
  • getOverflowCounter

Popular in Java

  • Finding current android device location
  • setRequestProperty (URLConnection)
  • requestLocationUpdates (LocationManager)
  • startActivity (Activity)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Option (scala)
  • CodeWhisperer alternatives
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