001 /** 002 * Copyright (c) 2003 Daffodil Software Ltd all rights reserved, 003 * Modifications Copyright (c) 2008 Regiscope Digital Imaging Co, LLC, All rights reserved. 004 * This program is free software; you can redistribute it and/or modify 005 * it under the terms of version 2 of the GNU General Public License as 006 * published by the Free Software Foundation. 007 * There are special exceptions to the terms and conditions of the GPL 008 * as it is applied to this software. See the GNU General Public License for more details. 009 * 010 * This program is distributed in the hope that it will be useful, 011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 013 * GNU General Public License for more details. 014 * 015 * You should have received a copy of the GNU General Public License 016 * along with this program; if not, write to the Free Software 017 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 018 */ 019 020 package org.dbreplicator.replication; 021 022 import java.rmi.*; 023 import java.sql.*; 024 import java.util.ArrayList; 025 import org.dbreplicator.replication.DBHandler.AbstractDataBaseHandler; 026 027 /** 028 * This is a remote interface which is implemented by the remote server class 029 * publication. This interface contains the declaration of all the methods 030 * which are needed by the subscriber at the time of 1. subscribing 2. taking 031 * snapshot 3. synchronization. 032 * 033 */ 034 035 public interface _PubImpl extends Remote { 036 037 void createStructure(int vendorName, String subName, String url, boolean isSchemaSupported,_FileUpload fileUpload,String remoteMachineAddress) throws RemoteException, SQLException, RepException; 038 039 public void createSnapShot(String subName,boolean isSchemaSupported,_FileUpload fileUpload,String remoteMachineAddress) throws RemoteException, SQLException, RepException; 040 041 public void synchronize(String subName, String remoteServerName,boolean isCreateTransactionLogFile,String remoteMachineAddress) throws 042 RemoteException, RepException; 043 044 public void push(String subName, String remoteServerName,boolean isCreateTransactionLogFile,String remoteMachineAddress) throws 045 RemoteException, RepException; 046 047 public Object[] createXMLForClient(String subName,String clientServerName,boolean isSchemaSupported,_FileUpload fileUpload,String remoteMachineAddress) throws 048 RemoteException, RepException; 049 050 public Object[] getPublisherAddressAndPort() throws 051 RemoteException, RepException; 052 053 String getConflictResolver() throws RemoteException; 054 055 String getFilterClause(SchemaQualifiedName tableName) throws RemoteException; 056 057 public String getServerName() throws RemoteException; 058 059 public void dropSubscription(String subName) throws RemoteException, 060 SQLException, RepException; 061 062 public void releaseLOCK() throws RemoteException; 063 064 065 public void checkForLock(String pubSubName) throws RepException,RemoteException; 066 067 // public void checkForLock() throws RepException,RemoteException; 068 // 069 public void saveSubscriptionData(String subName) throws RemoteException; 070 071 public int getPubVendorName() throws RemoteException, RepException; 072 073 public void updateBookMarkLastSyncId(String remote_Pub_Sub_Name, 074 Object[] lastId) throws RemoteException, 075 SQLException, RepException; 076 public void saveSubscriptionNewData(String subName) throws RemoteException ; 077 078 public void createSnapShotAfterUpdateSub(String address, int portNo, String subName,ArrayList tablesForSnapShot,boolean isSchemaSupported,_FileUpload fileUpload,String remoteMachineAddress) throws 079 SQLException, RemoteException, RepException; 080 081 public ArrayList dropTableListForSub(String subName) throws RepException, 082 SQLException,RemoteException ; 083 084 public void updatePublisherShadowAndBookmarkTableAfterPullOnSubscriber(String remote_Pub_Sub_Name, 085 Object[] lastId) throws RemoteException,SQLException, RepException ; 086 087 public _FileUpload getFileUploader() throws RepException, 088 SQLException,RemoteException ; 089 090 }

