|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinput.ExternalEventsQueue
public class ExternalEventsQueue
Queue of external events. This class also takes care of buffering the events and preloading only a proper amount of them.
| Field Summary | |
|---|---|
static java.lang.String |
PATH_SETTING
path of external events file -setting id ("filePath") |
static java.lang.String |
PRELOAD_SETTING
number of event to preload -setting id ("nrofPreload") |
static java.lang.String |
SETTINGS_NAMESPACE
ExternalEvents namespace ("ExternalEvents") |
| Constructor Summary | |
|---|---|
ExternalEventsQueue()
Creates a new Queue according to settings in the Settings object's ExternalEvent namespace. |
|
ExternalEventsQueue(java.lang.String filePath,
int nrofPreload)
Creates a new Queue from a file |
|
| Method Summary | |
|---|---|
int |
eventsLeftInBuffer()
Returns the amount of events left in the buffer at the moment (the amount can increase later if more events are read). |
ExternalEvent |
nextEvent()
Returns the next event in the queue or ExternalEvent with time of double.MAX_VALUE if there are no events left |
double |
nextEventsTime()
Returns next event's time or Double.MAX_VALUE if there are no events left |
void |
setNrofPreload(int nrof)
Sets maximum number of events that are read when the next preload occurs |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String SETTINGS_NAMESPACE
public static final java.lang.String PRELOAD_SETTING
public static final java.lang.String PATH_SETTING
| Constructor Detail |
|---|
public ExternalEventsQueue()
ExternalEventsQueue(String, int)
public ExternalEventsQueue(java.lang.String filePath,
int nrofPreload)
filePath - Path to the file where the events are read from. If
file ends with extension defined in BinaryEventsReader.BINARY_EXT
the file is assumed to be a binary file.nrofPreload - How many events to preloadBinaryEventsReader.BINARY_EXT,
BinaryEventsReader.storeToBinaryFile(String, List)| Method Detail |
|---|
public void setNrofPreload(int nrof)
nrof - Maximum number of events to readpublic double nextEventsTime()
public ExternalEvent nextEvent()
public int eventsLeftInBuffer()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||