@Override
@SuppressWarnings("unchecked")
public void run() {
final Object sub = serialHandle.getSubscribers();
if (sub instanceof RemoteHost) {
final RemoteHost host = (RemoteHost) sub;
if (hostId == null || !host.getHostId().equals(hostId)) {
host.write(new BindDataflow(DataflowExpression.this, value, host.getLocalHost().getId()));
}
}
if (sub instanceof List) {
//noinspection SynchronizeOnNonFinalField
synchronized (serialHandle) {
for (final SerialContext host : (List<SerialContext>) sub) {
if (hostId == null || !host.getHostId().equals(hostId)) {
host.write(new BindDataflow(DataflowExpression.this, value, host.getLocalHostId()));
}
}
}
}
}