Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Kieker 1.10
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## kieker.tools.tslib
Class TimeSeriesPointsBuffer<T>

    java.lang.Object
      java.util.AbstractCollection<E>
          java.util.AbstractQueue<E>
              java.util.concurrent.ConcurrentLinkedQueue<T>
                  kieker.tools.tslib.TimeSeriesPointsBuffer<T>

Type Parameters:
  `T` - The type of the buffer.

All Implemented Interfaces:
  Serializable, Iterable<T>, Collection<T>, Queue<T>, ITimeSeriesPointsBuffer<T>

    public class TimeSeriesPointsBuffer<T>

extends ConcurrentLinkedQueue<T>
implements ITimeSeriesPointsBuffer<T>

This is a thread-safe buffer for time series points, which has or has not a fixed capacity.

Since:
  1.10
Author:
  Tom Frotscher, Nils Christian Ehmke
See Also:
  Serialized Form

Constructor Summary
`TimeSeriesPointsBuffer()` Creates a new instance with infinite capacity.
`TimeSeriesPointsBuffer(int capacity)` Creates a new instance with the given capacity.

Method Summary
`boolean` | `add(T o)` Add an Object to the tail of the Buffer.
`int` | `getSize()` Returns the current size of the buffer.
`void` | `printBuffer()` print buffer.
`T` | `remove()` Removes a Value from the buffer in FIFO order.

Methods inherited from class java.util.concurrent.ConcurrentLinkedQueue
`contains, isEmpty, iterator, offer, peek, poll, remove, size, toArray, toArray`

Methods inherited from class java.util.AbstractQueue
`addAll, clear, element`

Methods inherited from class java.util.AbstractCollection
`containsAll, removeAll, retainAll, toString`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface java.util.Queue
`element`

Methods inherited from interface java.util.Collection
`addAll, clear, containsAll, equals, hashCode, removeAll, retainAll`

Constructor Detail

### TimeSeriesPointsBuffer

    public TimeSeriesPointsBuffer()

  Creates a new instance with infinite capacity.

### TimeSeriesPointsBuffer

    public TimeSeriesPointsBuffer(int capacity)

  Creates a new instance with the given capacity. A capacity of less or equal zero means that the capacity is infinite.

  Parameters:
    `capacity` - The capacity of the buffer

Method Detail

### add

    public boolean add(T o)

  Description copied from interface: `ITimeSeriesPointsBuffer`
  Add an Object to the tail of the Buffer.

  Specified by:
    `add` in interface `Collection<T>`
  Specified by:
    `add` in interface `Queue<T>`
  Specified by:
    `add` in interface `ITimeSeriesPointsBuffer<T>`
  Overrides:
    `add` in class `ConcurrentLinkedQueue<T>`
  Parameters:
    `o` - The Value to add
  Returns:
    Returns true if Object is added successfully

### remove

    public T remove()

  Description copied from interface: `ITimeSeriesPointsBuffer`
  Removes a Value from the buffer in FIFO order.

  Specified by:
    `remove` in interface `Queue<T>`
  Specified by:
    `remove` in interface `ITimeSeriesPointsBuffer<T>`
  Overrides:
    `remove` in class `AbstractQueue<T>`
  Returns:
    Returns the removed Object

### getSize

    public int getSize()

  Description copied from interface: `ITimeSeriesPointsBuffer`
  Returns the current size of the buffer.

  Specified by:
    `getSize` in interface `ITimeSeriesPointsBuffer<T>`
  Returns:
    Returned Buffersize

### printBuffer

    public void printBuffer()

  print buffer.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Kieker 1.10
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2014 Kieker Project, http://kieker-monitoring.net