예제 #1
1
  // @synchronization caller must have sync on fileSync !!!
  protected DecimatedStake allocAsync(Span span) throws IOException {
    if (!Thread.holdsLock(fileSync)) throw new IllegalMonitorStateException();

    final long floorStart = span.start & MAXMASK;
    final long ceilStop = (span.stop + MAXCEILADD) & MAXMASK;
    final Span extSpan =
        (floorStart == span.start) && (ceilStop == span.stop)
            ? span
            : new Span(floorStart, ceilStop);
    final Span[] fileSpans = new Span[SUBNUM];
    final Span[] biasedSpans = new Span[SUBNUM];
    long fileStart;
    long fileStop;

    if (tempFAsync == null) {
      // XXX THIS IS THE PLACE TO OPEN WAVEFORM CACHE FILE
      tempFAsync = createTempFiles();
    }
    synchronized (tempFAsync) {
      for (int i = 0; i < SUBNUM; i++) {
        fileStart = tempFAsync[i].getFrameNum();
        fileStop = fileStart + (extSpan.getLength() >> decimHelps[i].shift);
        tempFAsync[i].setFrameNum(fileStop);
        fileSpans[i] = new Span(fileStart, fileStop);
        biasedSpans[i] = extSpan;
      }
    }
    return new DecimatedStake(extSpan, tempFAsync, fileSpans, biasedSpans, decimHelps);
  }
예제 #2
0
  protected void removeAllDep(Object source, List stakes, CompoundEdit ce, Span union) {
    if (DEBUG) System.err.println("removeAllDep " + union.toString());
    if (1 == 1) throw new IllegalArgumentException("n.y.i.");

    // // ____ dep ____
    // if( dependants != null ) {
    // 	synchronized( dependants ) {
    // 		for( int i = 0; i < dependants.size(); i++ ) {
    // 			((Trail) dependants.get( i )).removeAllDep( source, stakes, ce, union
    // 			);
    // 		}
    // 	}
    // }
  }