2019-03-07 11:32:45 +01:00
|
|
|
package org.warp.jcwdb.database;
|
2019-01-31 20:05:23 +01:00
|
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
|
|
|
public interface IReferencesMetadata {
|
|
|
|
/**
|
|
|
|
* Get block of reference
|
|
|
|
* @param reference reference
|
|
|
|
* @return block id
|
|
|
|
*/
|
|
|
|
long getReference(long reference) throws IOException;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Allocate a block for a new reference
|
|
|
|
* @param blockId block id
|
|
|
|
* @return reference
|
|
|
|
*/
|
|
|
|
long newReference(long blockId) throws IOException;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Change reference size
|
|
|
|
* @param reference reference
|
|
|
|
* @param blockId block id
|
|
|
|
*/
|
|
|
|
void editReference(long reference, long blockId) throws IOException;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Close file
|
|
|
|
*/
|
|
|
|
void close() throws IOException;
|
2019-03-02 17:47:24 +01:00
|
|
|
|
|
|
|
long getFirstFreeReference();
|
2019-01-31 20:05:23 +01:00
|
|
|
}
|