All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.zoodb.jdo.internal.server.StorageChannel Maven / Gradle / Ivy

The newest version!
/*
 * Copyright 2009-2013 Tilmann Zaeschke. All rights reserved.
 * 
 * This file is part of ZooDB.
 * 
 * ZooDB is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * ZooDB 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 General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with ZooDB.  If not, see .
 * 
 * See the README and COPYING files for further information. 
 */
package org.zoodb.jdo.internal.server;

import java.nio.ByteBuffer;


/**
 * A StorageChannel manages a database file and provides read- and 
 * write-views on it. 
 * 
 * @author Tilmann Zaeschke
 *
 */
public interface StorageChannel {

	StorageChannelInput getReader(boolean autoPaging);

	StorageChannelOutput getWriter(boolean autoPaging);

	void reportFreePage(int pageId);

	int getPageSize();

	void close();

	void flush();

	void write(ByteBuffer buf, long currentPage);

	void readPage(ByteBuffer buf, long pageId);

	int statsGetReadCount();

	int statsGetWriteCount();

	int statsGetReadCountUnique();

	void acquireLock(long txId);

	long getTxId();

	int statsGetPageCount();

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy