/*
Copyright (C) 2007 Mobixess Inc. http://www.java-objects-database.com
This file is part of the JODB (Java Objects Database) open source project.
JODB is free software; you can redistribute it and/or modify it under
the terms of version 2 of the GNU General Public License as published
by the Free Software Foundation.
JODB 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 this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package com.mobixess.jodb.core.io;
import java.io.IOException;
import java.io.PrintStream;
import java.lang.reflect.Field;
import java.net.URI;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import com.mobixess.jodb.core.IDatabaseStatistics;
import com.mobixess.jodb.core.IPersistentObjectStatistics;
import com.mobixess.jodb.core.IllegalClassTypeException;
import com.mobixess.jodb.core.JodbIOException;
import com.mobixess.jodb.core.index.JODBIndexingRootAgent;
import com.mobixess.jodb.core.query.QueryNode;
import com.mobixess.jodb.core.transaction.JODBQueryList;
import com.mobixess.jodb.core.transaction.JODBSession;
import com.mobixess.jodb.core.transaction.TransactionContainer;
public interface IOBase {
void close() throws IOException;
boolean isNewDatabase();
boolean isClosed() throws IOException;
IDatabaseStatistics getDatabaseStatistics() throws IOException;
long getFirstObjectOffset() throws IOException;
long[] getForAllObjects(IOTicket ioTicket) throws IOException;
void applyTransaction(TransactionContainer transactionContainer,
JODBSession session, IOTicket writeTicket,
JODBIndexingRootAgent indexingRootAgent) throws IOException;
IPersistentObjectStatistics getPersistenceStatistics(long offset,
JODBSession session) throws IOException;
int getClassTypeSubstitutionID(String classType) throws JodbIOException;
int getOrSetClassTypeSubstitutionID(Class clazz) throws IOException;
int getOrSetClassTypeSubstitutionID(String classType) throws IOException;
int getOrSetFieldSubstitutionID(Field field);
int getFieldSubstitutionID(Field field);
String getFullFieldNameForID(int id) throws IOException;
String getSimpleFieldNameForID(int id) throws IOException;
String getClassTypeForID(int id) throws JodbIOException;
String getPrefixForID(int id) throws IOException;
IOTicket getIOTicket(boolean read, boolean write) throws IOException;
URI getDbIdentificator();
void printFileMap(JODBSession session, PrintStream printStream) throws IOException;
ReentrantReadWriteLock getTransactionLock();
JODBQueryList executeQuery(QueryNode query) throws IOException, IllegalClassTypeException;
//long getTransactionOffset();
}
|