|
MATES 3.0-rc2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mates.util.Bundle
A data encapsulator class for automating concurrent processes.
This is the main data structure used by the BatchProcessor
architecture.
It is possible to extend this class, however not necessary.
Most extensions of this class will need to re-implement the clone()
function, as this is used in BatchProcessor.process(Bundle)
to create new Bundles for each of
the processing threads.
Nested Class Summary | |
protected class |
Bundle.BundleIterator
An iterator class for a Bundle . |
Constructor Summary | |
Bundle()
Default constructor. |
|
Bundle(int data_offset,
int data_range,
java.lang.Object payload)
Conveniance constructor. |
Method Summary | |
protected java.lang.Object |
clone()
Creates a copy of this bundle. |
java.util.Iterator |
elements()
Returns an iterator for the current list this bundle is a member of. |
int |
getDataOffset()
Accessor for the data offset. |
int |
getDataRange()
Accessor for the data range. |
Bundle |
getNext()
Returns the next Bundle in the current list. |
java.lang.Object |
getPayload()
Returns the payload of this bundle. |
void |
insertAfter(Bundle bundle)
Inserts a bundle in the current list between this
and this. |
void |
setDataOffset(int offset)
Sets the data offset. |
void |
setDataRange(int range)
Sets the data range. |
void |
setPayload(java.lang.Object payload)
Sets the payload of this bundle. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Bundle()
public Bundle(int data_offset, int data_range, java.lang.Object payload)
Method Detail |
protected java.lang.Object clone()
public void setDataOffset(int offset)
public int getDataOffset()
public int getDataRange()
public void setDataRange(int range)
public void setPayload(java.lang.Object payload)
BatchProcessor.process(Bundle)
.
The payload of a bundle is generally not cloned during clone()
. This is one way of collecting batch
processing results; each processor can add the resulting object
to this bundle, which, in turn, gets appended to the input
bundle to BatchProcessor.process(Bundle)
.
public java.lang.Object getPayload()
setPayload(Object)
public java.util.Iterator elements()
BatchProcessor.process(Bundle)
.
BatchProcessor
public Bundle getNext()
elements()
public void insertAfter(Bundle bundle)
this
and this.
getNext()
.
bundle
- the bundle to be inserted in the list.
|
MATES 3.0-rc2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |