コード例 #1
0
ファイル: TreeNode.java プロジェクト: huangjun-pg/mpich2-yarn
 public void writeObject(MixedDataOutput outs) throws java.io.IOException {
   super.writeObject(outs); // BufForDrawable.writeObject( outs );
   if (childnode != null) {
     outs.writeInt(childnode.shadowbufs.size());
     Iterator belowbufs = childnode.shadowbufs.iterator();
     while (belowbufs.hasNext()) ((BufForShadows) belowbufs.next()).writeObject(outs);
     // Mark the ShadowBufs in the children node has been saved
     childnode.haveShadowBufsBeenSaved = true;
   } else // childnode == null
   outs.writeInt(0);
 }
コード例 #2
0
ファイル: TreeNode.java プロジェクト: huangjun-pg/mpich2-yarn
  public void empty() {
    if (childnode != null && childnode.haveShadowBufsBeenSaved) {
      Iterator belowbufs = childnode.shadowbufs.iterator();
      while (belowbufs.hasNext()) ((BufForShadows) belowbufs.next()).empty();
      // renewShadowBufs() for others to use
      childnode.shadowbufs.clear();
      childnode.haveShadowBufsBeenSaved = false;
    }

    // try to clear() on BufForDrawables.buf4drawables
    super.empty();
  }
コード例 #3
0
ファイル: TreeNode.java プロジェクト: huangjun-pg/mpich2-yarn
  /*
     finalizeLatestTime() should be invoked BEFORE
     mergeVerticalShadowBufs() and shiftHorizontalShadowBuf() are called
  */
  public void finalizeLatestTime(final Drawable last_drawable_added) {
    if (childnode == null) // i.e. if ( super.isLeaf() )
    super.setLatestTime(last_drawable_added.getLatestTime());
    else // if ( childnode != null )
    super.setLatestTime(childnode.getLatestTime());

    if (shadowbuf != null) {
      // After setting the LatestTime, seal the shadows' category weights
      shadowbuf.setLatestTime(super.getLatestTime());
      shadowbuf.initializeMapOfCategoryWeights();
    }
  }