public Object clone() { try { GNodeTuplesImpl t = (GNodeTuplesImpl)super.clone(); t.variables = (Variable[])variables.clone(); if (t.lowAVLNode != null) { t.lowAVLNode.incRefCount(); t.objectPool.incRefCount(); t.token = use(); // Allocate a new token. if (t.avlNode != null) { t.avlNode.incRefCount(); } } return t; } catch (CloneNotSupportedException e) { throw new Error( getClass() + " doesn't support clone, which it must", e ); } }
nrGNodesValid = true; } else { objectPool.incRefCount(); token = use();
/** * Constructs a FreeList which uses the specified file (if it exists) or * creates a new file (if it doesn't already exist). * * @param objectPool the ObjectPool to use when allocating Blocks. * @param file the file. * @param ioType the IOType to use for the BlockFile. * @throws IOException if an I/O error occurs. */ private FreeList( ObjectPool objectPool, File file, BlockFile.IOType ioType ) throws IOException { this.objectPool = objectPool; objectPool.incRefCount(); this.file = file; blockFile = AbstractBlockFile.openBlockFile(file, BLOCK_SIZE_B, ioType); itemToPhaseSeqMap = IntFile.open(file + INTFILE_EXT); itemToPhaseSeqMap.clear(); }