|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.jas.util.DistributedList
public class DistributedList
Distributed version of a List. Implemented with a SortedMap / TreeMap to keep the sequence order of elements.
Field Summary | |
---|---|
protected edu.unima.ky.parallel.ChannelFactory |
cf
|
protected edu.unima.ky.parallel.SocketChannel |
channel
|
protected Listener |
listener
|
protected java.util.SortedMap |
theList
|
Constructor Summary | |
---|---|
DistributedList(edu.unima.ky.parallel.ChannelFactory cf,
java.lang.String host,
int port)
|
|
DistributedList(edu.unima.ky.parallel.SocketChannel sc)
|
|
DistributedList(java.lang.String host)
Constructs a new DistributedList |
|
DistributedList(java.lang.String host,
int port)
|
Method Summary | |
---|---|
void |
add(java.lang.Object o)
Add object to the list and distribute to other lists. |
void |
clear()
Clear the List caveat: must be called on all clients |
java.util.List |
getList()
Get the internal list, convert from Collection |
boolean |
isEmpty()
Is the List empty? |
java.util.Iterator |
iterator()
List iterator |
int |
size()
Size of the (local) list |
void |
terminate()
Terminate the list thread |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final java.util.SortedMap theList
protected final edu.unima.ky.parallel.ChannelFactory cf
protected edu.unima.ky.parallel.SocketChannel channel
protected Listener listener
Constructor Detail |
---|
public DistributedList(java.lang.String host)
host
- Name or IP of server hostpublic DistributedList(java.lang.String host, int port)
public DistributedList(edu.unima.ky.parallel.ChannelFactory cf, java.lang.String host, int port)
public DistributedList(edu.unima.ky.parallel.SocketChannel sc)
Method Detail |
---|
public java.util.List getList()
public int size()
public void add(java.lang.Object o)
public void terminate()
public void clear()
public boolean isEmpty()
public java.util.Iterator iterator()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |