/*
PointerBlock.java
*
* Copyright (c) 2002, Benja Fallenstein
*
* This file is part of Storm.
*
* Storm is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* Storm is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
* Public License for more details.
*
* You should have received a copy of the GNU Lesser General
* Public License along with Storm; if not, write to the Free
* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
*/
/*
* Written by Benja Fallenstein
*/
package org.nongnu.storm;
import java.io.*;
import java.util.*;
public interface PointerBlock {
Pointer getPointer() throws IOException;
BlockId getTarget() throws IOException;
/** Get the Block
object for the pointer block
* represented by this object.
*/
Block getBlock();
/** Get the ids of all pointer blocks obsoleted by this one.
* This returns a set of BlockId
objects, not of
* PointerBlock
objects, because we aren't always able
* to load the blocks refered to by the ids (e.g., they may have
* been deleted).
*/
Set getObsoleted() throws IOException;
/** Change the target of this pointer, obsoleting this block.
* This creates a new PointerBlock for this pointer that
* points to newTarget
and obsoletes this
* pointer block. The new pointer block is both added to the
* block pool and returned by this method.
*/
PointerBlock update(BlockId newTarget) throws IOException;
}