private JwSet<String> _getLockedFilenames(List<String> filenames) {
    JwSet<String> l = new JwSet<String>();
    for (String filename : filenames)
      if (filename.endsWith(LOCK_EXTENSION_TEMPLAR))
        l.add(_getFileNameWithoutExtension(LOCK_EXTENSION_TEMPLAR, filename));
      else if (filename.endsWith(LOCK_EXTENSION_THREAD_TEMPLAR))
        l.add(_getFileNameWithoutExtension(LOCK_EXTENSION_THREAD_TEMPLAR, filename));
      else if (hasLockPrefix() && filename.startsWith(getLockPrefix()))
        l.add(getFileNameFromTempName(filename));

    return l;
  }
Exemplo n.º 2
0
  /**
   * Load the batch nest associated with the specified nest. This is used when processing alias
   * actions where the alias has not yet been mapped to a nest. The nest being passed in could be
   * new or it could be an existing nest. Either way we need to load or create the associated batch
   * nest.
   */
  public AcActionSnapshot loadNest(AcBatch batch, AcNest nest) {
    _batch = batch;

    _items = new JwMap<Integer, AcBatchItem>();
    _nests = new JwMap<Integer, AcBatchNest>();
    _aliases = new JwMap<Integer, AcBatchAlias>();
    _flights = new JwMap<Integer, AcBatchFlight>();

    JwSet<Integer> flightIds = new JwSet<Integer>();
    JwSet<Integer> nestIds = new JwSet<Integer>();
    nestIds.add(nest.getId());

    fillNests(nestIds);
    AcBatchNest.collectFlightIdsOn(_nests.values(), flightIds);

    fillFlights(flightIds);
    return getSnapshot(true);
  }
Exemplo n.º 3
0
 private void addBatchGroup(JwMap<Integer, JwSet<Integer>> m, Integer batchId, Integer groupCode) {
   if (groupCode == null) return;
   if (!m.containsKey(batchId)) m.put(batchId, new JwSet<Integer>());
   JwSet<Integer> groups = m.get(batchId);
   groups.add(groupCode);
 }
Exemplo n.º 4
0
 public static JwSet<Integer> collectActionIds(JwList<AcProblem> v) {
   JwSet<Integer> ids = new JwSet<Integer>();
   for (AcProblem e : v) ids.add(e.getActionId());
   return ids;
 }