com.atlassian.core.task
Class LocalFifoBuffer<T>

java.lang.Object
  extended by com.atlassian.core.task.LocalFifoBuffer<T>
All Implemented Interfaces:
FifoBuffer<T>

public class LocalFifoBuffer<T>
extends Object
implements FifoBuffer<T>


Constructor Summary
LocalFifoBuffer()
           
 
Method Summary
 void add(T o)
          Add an Object to the buffer
 void clear()
          Clear all the objects from the buffer
 Collection<T> getItems()
          The buffer in the queue
 T remove()
          Get the oldest object from the buffer
 int size()
          The number of buffer in the queue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalFifoBuffer

public LocalFifoBuffer()
Method Detail

remove

public T remove()
Description copied from interface: FifoBuffer
Get the oldest object from the buffer

Specified by:
remove in interface FifoBuffer<T>
Returns:
the oldest Object, or null if the queue is empty

add

public void add(T o)
Description copied from interface: FifoBuffer
Add an Object to the buffer

Specified by:
add in interface FifoBuffer<T>
Parameters:
o - the Object to add

size

public int size()
Description copied from interface: FifoBuffer
The number of buffer in the queue

Specified by:
size in interface FifoBuffer<T>

getItems

public Collection<T> getItems()
Description copied from interface: FifoBuffer
The buffer in the queue

Specified by:
getItems in interface FifoBuffer<T>

clear

public void clear()
Description copied from interface: FifoBuffer
Clear all the objects from the buffer

Specified by:
clear in interface FifoBuffer<T>


Copyright © 2015 Atlassian. All rights reserved.