use of es.bsc.compss.types.data.listener.EventListener in project compss by bsc-wdc.
the class NIOAdaptor method registerCopy.
public void registerCopy(Copy c) {
for (EventListener el : c.getEventListeners()) {
Integer groupId = el.getId();
LinkedList<Copy> copies = GROUP_TO_COPY.get(groupId);
if (copies == null) {
copies = new LinkedList<Copy>();
GROUP_TO_COPY.put(groupId, copies);
}
copies.add(c);
}
}
use of es.bsc.compss.types.data.listener.EventListener in project compss by bsc-wdc.
the class DataOperation method notifyEnd.
private void notifyEnd(OpEndState state, Exception e) {
synchronized (listeners) {
endState = state;
endException = e;
// Check end state of the operation
switch(state) {
case OP_OK:
for (EventListener listener : listeners) {
listener.notifyEnd(this);
}
break;
case OP_IN_PROGRESS:
break;
case OP_WAITING_SOURCES:
break;
default:
// OP_FAILED or OP_PREPARATION_FAILED
for (EventListener listener : listeners) {
listener.notifyFailure(this, e);
}
break;
}
}
}
Aggregations