001: /*
002: Copyright (C) 2007 Mobixess Inc. http://www.java-objects-database.com
003:
004: This file is part of the JODB (Java Objects Database) open source project.
005:
006: JODB is free software; you can redistribute it and/or modify it under
007: the terms of version 2 of the GNU General Public License as published
008: by the Free Software Foundation.
009:
010: JODB is distributed in the hope that it will be useful, but WITHOUT ANY
011: WARRANTY; without even the implied warranty of MERCHANTABILITY or
012: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
013: for more details.
014:
015: You should have received a copy of the GNU General Public License along
016: with this program; if not, write to the Free Software Foundation, Inc.,
017: 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
018: */
019: package com.mobixess.jodb.core.io.rmi;
020:
021: import java.io.IOException;
022: import java.net.URI;
023: import java.rmi.Remote;
024: import java.rmi.RemoteException;
025:
026: import com.mobixess.jodb.core.IDatabaseStatistics;
027: import com.mobixess.jodb.core.IPersistentObjectStatistics;
028: import com.mobixess.jodb.core.index.JODBIndexingRootAgent;
029: import com.mobixess.jodb.core.io.IOTicket;
030: import com.mobixess.jodb.core.query.QueryNode;
031: import com.mobixess.jodb.core.transaction.JODBSession;
032: import com.mobixess.jodb.core.transaction.TransactionContainer;
033: import com.mobixess.jodb.soda.api.Query;
034: import com.mobixess.jodb.util.LongVector;
035:
036: public interface IRemoteServer extends Remote {
037: void close() throws IOException, RemoteException;
038:
039: //boolean isNewDatabase() throws RemoteException;
040:
041: boolean isClosed() throws RemoteException;
042:
043: IDatabaseStatistics getDatabaseStatistics() throws RemoteException;
044:
045: long getFirstObjectOffset() throws RemoteException;
046:
047: long[] getForAllObjects(int ioTicket) throws IOException;
048:
049: void applyTransaction(TransactionContainer transactionContainer,
050: JODBSession session, IOTicket writeTicket,
051: JODBIndexingRootAgent indexingRootAgent) throws IOException;
052:
053: IPersistentObjectStatistics getPersistenceStatistics(long offset,
054: JODBSession session) throws IOException;
055:
056: int getClassTypeSubstitutionID(String getClassTypeSubstitutionID)
057: throws IOException;
058:
059: int getOrSetClassTypeSubstitutionID(Class clazz) throws IOException;
060:
061: int getOrSetClassTypeSubstitutionID(String classType)
062: throws IOException;
063:
064: //int getOrSetFieldSubstitutionID(Field field) throws RemoteException;
065:
066: //int getFieldSubstitutionID(Field field) throws RemoteException;
067:
068: int getOrSetFieldSubstitutionID(int declaringClassID,
069: int fieldTypeID, String fieldName) throws IOException;
070:
071: String getFullFieldNameForID(int id) throws IOException;
072:
073: String getSimpleFieldNameForID(int id) throws IOException;
074:
075: String getClassTypeForID(int id) throws IOException;
076:
077: String getPrefixForID(int id) throws IOException;
078:
079: IPersistentObjectStatistics getPersistenceStatistics(long offset)
080: throws IOException;
081:
082: IOTicketRemoteInterface getIOTicket(boolean read, boolean write)
083: throws IOException;
084:
085: URI getDbIdentificator() throws IOException;
086:
087: IRemoteTransactionContainer getRemoteTransactionContainer()
088: throws IOException;
089:
090: IServerQueryResult runQuery(QueryNode query,
091: long[] localActiveObjects) throws IOException;
092:
093: public interface IServerQueryResult {
094: long[] getExcludedObjects();
095:
096: long[] getSearchResult();
097: }
098:
099: //void printFileMap(JODBSession session, PrintStream printStream) throws IOException;
100: }
|