Tabnine Logo
QueueStatistics.remove
Code IndexAdd Tabnine to your IDE (free)

How to use
remove
method
in
org.ice4j.util.QueueStatistics

Best Java code snippets using org.ice4j.util.QueueStatistics.remove (Showing top 11 results out of 315)

origin: jitsi/ice4j

/**
 * Removes and returns the packet ({@code T}) at the head of this queue, if
 * the queue is non-empty. If the queue is closed or empty, returns null
 * without blocking.
 * @return the packet at the head of this queue, or null if the queue is
 * empty.
 */
public T poll()
{
  if (closed)
    return null;
  if (asyncQueueHandler != null)
  {
    // If the queue was configured with a handler, it is running its
    // own reading thread, and reading from it via this interface would
    // not provide consistent results.
    throw new IllegalStateException(
      "Trying to read from a queue with a configured handler.");
  }
  synchronized (queue)
  {
    T pkt = queue.poll();
    if (pkt != null && queueStatistics != null)
    {
      queueStatistics.remove(System.currentTimeMillis());
    }
    return pkt;
  }
}
origin: jitsi/ice4j

queueStatistics.remove(System.currentTimeMillis());
origin: jitsi/ice4j

/**
 * Adds pkt to this socket. If the queue is full, drops a packet. Does
 * not block.
 */
public void addBuffer(Buffer buf)
{
  synchronized (queue)
  {
    // Drop the first rather than the current packet, so that
    // receivers can notice the loss earlier.
    if (queue.size() == QUEUE_SIZE)
    {
      logger.info("Dropping a packet because the queue is full.");
      if (queueStatistics != null)
      {
        queueStatistics.remove(System.currentTimeMillis());
      }
      queue.poll();
    }
    queue.offer(buf);
    if (queueStatistics != null)
    {
      queueStatistics.add(System.currentTimeMillis());
    }
    queue.notify();
  }
}
origin: jitsi/ice4j

if (queueStatistics != null)
  queueStatistics.remove(System.currentTimeMillis());
origin: jitsi/ice4j

queueStatistics.remove(System.currentTimeMillis());
origin: jitsi/libjitsi

if (writeQStats != null)
  writeQStats.remove(System.currentTimeMillis());
origin: jitsi/libjitsi

if (readQStats != null)
  readQStats.remove(System.currentTimeMillis());
origin: jitsi/libjitsi

if (writeQStats != null)
  writeQStats.remove(System.currentTimeMillis());
origin: jitsi/libjitsi

queueStats.remove(System.currentTimeMillis());
origin: jitsi/libjitsi

queueStats.remove(now);
origin: jitsi/libjitsi

if (readQStats != null)
  readQStats.remove(now);
org.ice4j.utilQueueStatisticsremove

Javadoc

Registers the removal of a packet from the corresponding queue.

Popular methods of QueueStatistics

  • <init>
    Initializes a new QueueStatistics instance.
  • add
    Registers the addition of a packet to the corresponding queue.
  • print
  • update

Popular in Java

  • Finding current android device location
  • getExternalFilesDir (Context)
  • scheduleAtFixedRate (Timer)
  • addToBackStack (FragmentTransaction)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • JButton (javax.swing)
  • Top plugins for WebStorm
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