// TODO May be possible to do finer-grained locks.
private void cancelWatchesForAttempt(AttemptPathIdentifier pathIdentifier) {
    // TODO May be possible to do finer-grained locks.
    synchronized(watchesPerAttempt) {
      List<WatchKey> list = watchesPerAttempt.remove(pathIdentifier);
      if (list != null) {
        for (WatchKey watchKey : list) {
          watchKey.cancel();
        }
      }
    }
  }
private void cancelWatchesForAttempt(AttemptPathIdentifier pathIdentifier) {
// TODO May be possible to do finer-grained locks.
synchronized(watchesPerAttempt) {
List<WatchKey> list = watchesPerAttempt.remove(pathIdentifier);
private void cancelWatchesForAttempt(AttemptPathIdentifier pathIdentifier) {
// TODO May be possible to do finer-grained locks.
synchronized(watchesPerAttempt) {
List<WatchKey> list = watchesPerAttempt.remove(pathIdentifier);
if (list != null) {
for (WatchKey watchKey : list) {
watchKey.cancel();
}
}
}
}
private void cancelWatchesForAttempt(AttemptPathIdentifier pathIdentifier) {
// TODO May be possible to do finer-grained locks.
synchronized(watchesPerAttempt) {
List<WatchKey> list = watchesPerAttempt.remove(pathIdentifier);
if (list != null) {
for (WatchKey watchKey : list) {
watchKey.cancel();
}
}
}
}