Interface DataQueue
-
- All Implemented Interfaces:
public interface DataQueueA Thread-Safe Queue used to store DataEntity Objects.
-
-
Method Summary
Modifier and Type Method Description abstract booleanadd(DataEntity dataEntity)Add a new DataEntity Object to DataQueue abstract DataEntitypeek()Retrieves the head of DataQueue else returns null if DataQueue is empty. abstract List<DataEntity>peek(int n)Retrieves the first n entries in this DataQueue. abstract booleanremove()Removes the head of this DataQueue abstract booleanremove(int n)Removed the first n elements in this DataQueue abstract booleanclear()Removes all stored DataEntity objects. abstract intcount()Returns the count of DataEntity objects in this DataQueue. abstract voidclose()Closes the current DataQueue. -
-
Method Detail
-
add
abstract boolean add(DataEntity dataEntity)
Add a new DataEntity Object to DataQueue
- Returns:
true if successfully added else false.
-
peek
abstract DataEntity peek()
-
peek
abstract List<DataEntity> peek(int n)
-
remove
abstract boolean remove()
Removes the head of this DataQueue
- Returns:
true if successfully removed else returns false.
-
remove
abstract boolean remove(int n)
Removed the first n elements in this DataQueue
- Returns:
true if successfully removed else returns false.
-
clear
abstract boolean clear()
Removes all stored DataEntity objects.
- Returns:
true if successfully removed else returns false.
-
count
abstract int count()
Returns the count of DataEntity objects in this DataQueue.
-
-
-
-