package it.cavallium.strangedb.database; import it.cavallium.strangedb.database.references.ReferenceInfo; import java.io.IOException; public interface IReferencesMetadata { /** * Get block of reference * @param reference reference * @return block id */ long getReferenceBlockId(long reference) throws IOException; /** * Get reference info * @param reference reference * @return reference info */ ReferenceInfo getCleanReference(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 * @param reference reference * @param cleanerId cleaner id * @param blockId block id */ void editReference(long reference, byte cleanerId, long blockId) throws IOException; /** * Delete reference * @param reference reference */ void deleteReference(long reference) throws IOException; /** * Close file */ void close() throws IOException; long getFirstFreeReference(); }