public interface IncomingData<DATATYPE extends Data>
Modifier and Type | Interface and Description |
---|---|
static class |
IncomingData.NullIncomingData<DATATYPE extends Data>
Creates a null implementation of this which is empty and complete at creation:
Provides immediate return without incurring any memory synchronization for
any read method.
|
Modifier and Type | Method and Description |
---|---|
void |
add(DATATYPE data)
Add new data without completing this
|
void |
add(List<DATATYPE> data)
Add new data without completing this.
|
void |
addLast(DATATYPE data)
Add new data and mark this as completed
|
void |
addLast(List<DATATYPE> data)
Add new data and mark this as completed
|
void |
addNewDataListener(Runnable listener,
Executor executor)
Add a listener which will be invoked every time new data is added to this.
|
com.google.common.util.concurrent.ListenableFuture<DataList<DATATYPE>> |
completed()
Returns a future in which all the incoming data that will be produced in this is available.
|
List<DATATYPE> |
drain()
Get and remove all the data currently available in this
|
DataList<DATATYPE> |
getOwner()
Returns the owner (target DataList) of this.
|
boolean |
isComplete()
Returns whether this is complete
|
void |
markComplete()
Mark this as completed and notify any listeners.
|
DataList<DATATYPE> getOwner()
com.google.common.util.concurrent.ListenableFuture<DataList<DATATYPE>> completed()
The data is not drained
into the owner of this by this method. That must be done
by the thread using the data list.
This return the list owning this for convenience.
boolean isComplete()
void addLast(DATATYPE data)
IllegalStateException
- if this is already complete or does not allow writesvoid add(DATATYPE data)
IllegalStateException
- if this is already complete or does not allow writesvoid addLast(List<DATATYPE> data)
IllegalStateException
- if this is already complete or does not allow writesvoid add(List<DATATYPE> data)
IllegalStateException
- if this is already complete or does not allow writesvoid markComplete()
Copyright © 2018. All rights reserved.