public class ParallelObservable<P> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected CopyOnWriteArrayList<ASyncObserver<P>> |
list |
protected ExecutorService |
loop
ExecutorService that deals with the Threads handling the commands.
|
| Constructor and Description |
|---|
ParallelObservable()
Here the threads handling the updates are daemons.
|
ParallelObservable(ExecutorService execService) |
| Modifier and Type | Method and Description |
|---|---|
void |
addObserver(ASyncObserver<P> observer) |
void |
notifyObservers(P data)
do not need a call to setChanged: observers
are immediately notified through different threads
|
void |
removeObserver(ASyncObserver<P> observer) |
protected CopyOnWriteArrayList<ASyncObserver<P>> list
protected ExecutorService loop
public ParallelObservable()
public ParallelObservable(ExecutorService execService)
public void addObserver(ASyncObserver<P> observer)
public void removeObserver(ASyncObserver<P> observer)
public void notifyObservers(P data)
data - Copyright © 2015 LSST. All rights reserved.