|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.davisor.data.VoidData
com.davisor.data.stream.CollectionDataSource
com.davisor.data.stream.ListDataBuffer
com.davisor.data.stream.LazyListDataBuffer
LazyListDataBuffer implements a delayed initialization list data
buffer. In particular, the buffer will be filled with data copied
from a given data source, but only when the buffer is actually
accessed the first time with a call to any of the DataBuffer interface methods.
The initialization status of lazy list data buffers can be checked
with notInitialized() method which will return
true until the the buffer has been initialized. Please
note that an notInitialized() call will not trigger data
buffer initialization.
notInitialized()| Field Summary | |
boolean |
DEBUG
debug switch |
protected DataSource |
M_dataSource
Data buffer data source. |
| Fields inherited from class com.davisor.data.stream.CollectionDataSource |
M_collection |
| Fields inherited from class com.davisor.data.VoidData |
M_type |
| Constructor Summary | |
LazyListDataBuffer(DataSource dataSource)
Creates a new delayed initialization list data buffer. |
|
| Method Summary | |
DataValue |
getData(int index)
Gets the specific data element. |
int |
getSize()
Gets the number of data in the buffer. |
DataStream |
getStream()
Gets a new data stream from the data source. |
DataStream |
getStream(boolean reversed)
Gets a new data stream from the data source. |
Type |
getType()
Gets the type of this data object. |
protected void |
init()
Delayed initializer. |
boolean |
notInitialized()
Tests if this instance has not been initialized. |
java.lang.String |
toString(java.lang.String id,
java.lang.String dataName)
Gets XML representation for the asked channel. |
| Methods inherited from class com.davisor.data.stream.ListDataBuffer |
getList |
| Methods inherited from class com.davisor.data.stream.CollectionDataSource |
addAll, close, getCollection, setType, toString |
| Methods inherited from class com.davisor.data.VoidData |
equals, getDataValue, hashCode |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.davisor.data.stream.DataSource |
close |
| Field Detail |
public final boolean DEBUG
protected DataSource M_dataSource
| Constructor Detail |
public LazyListDataBuffer(DataSource dataSource)
| Method Detail |
public Type getType()
throws InvalidDataException
getType in interface DatagetType in class VoidDataInvalidDataException
public DataStream getStream()
throws InvalidDataException
getStream in interface DataSourcegetStream in class CollectionDataSourceInvalidDataExceptionIteratorDataStream.IteratorDataStream(Collection,Type)
public java.lang.String toString(java.lang.String id,
java.lang.String dataName)
toString in interface DataSourcetoString in class CollectionDataSourceid - channel iddataName - channel dataName
public DataValue getData(int index)
throws com.davisor.core.InvalidIndexException
If current data source has not yet been consulted, it will be, now.
getData in interface DataBuffergetData in class ListDataBufferindex - data element index
com.davisor.core.InvalidIndexException - if no data is bound to given indexnotInitialized()public int getSize()
If current data source has not yet been consulted, it will be, now. If initialization fails, buffer size remains zero.
getSize in interface DataBuffergetSize in class ListDataBuffernotInitialized()
public DataStream getStream(boolean reversed)
throws InvalidDataException
If current data source has not yet been consulted, it will be, now.
getStream in interface DataBuffergetStream in class ListDataBufferreversed - controls if stream reads buffer forwards or backwards
InvalidDataException - if a new stream can not be creatednotInitialized()
protected void init()
throws InvalidDataException
InvalidDataExceptionpublic boolean notInitialized()
true if this instances has not been initialized yet
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||