org.gcube.indexmanagement.storagehandling
Class RemoteDeltaListManager

java.lang.Object
  extended by org.gcube.indexmanagement.storagehandling.RemoteDeltaListManager
All Implemented Interfaces:
DeltaListManagementWrapper

public class RemoteDeltaListManager
extends java.lang.Object
implements DeltaListManagementWrapper


Constructor Summary
RemoteDeltaListManager(java.lang.String indexManagementID, org.apache.axis.message.addressing.EndpointReferenceType indexManagerEPR, GCUBEServiceContext sctx)
          Constructs a new RemoteDeltaListManager
RemoteDeltaListManager(java.lang.String indexManagementID, GCUBEServiceContext sctx, java.lang.String managementServiceNamespace)
          Constructs a new RemoteDeltaListManager
 
Method Summary
 int connectLookup()
          Connects a lookup to the index management resource.
 ConnectUpdaterResponse connectUpdater()
          Connects an updater to the index management resource.
 void disconnectUpdater(int updaterID)
          Disconnects an updater from the index management resource.
 java.lang.String getDeltaCollectionID()
          Returns a ID of the collection with the delta related documents
 DeltaFileInfoType getDeltaFileInfo(int idx)
          Returns info about a given delta file.
 DeltaFileInfoType[] getDeltaFileList()
          Returns the delta file list.
 org.apache.axis.message.addressing.EndpointReferenceType getIndexManagerEPR()
           
 boolean isEmpty()
           
 void mergeDeltaFile(DeltaFileInfoType deltaInfo)
          Merges a delta file with the main index.
 void setIndexManagerEPR(org.apache.axis.message.addressing.EndpointReferenceType managerEPR)
          Sets the EPR of the remote delta list manager
 org.globus.wsrf.core.notification.SubscriptionManager subscribeForAdditions(IndexNotificationConsumer consumer)
          Subsribes this RemoteDeltaListManager for notifications concerning additions of data to the index.
 org.globus.wsrf.core.notification.SubscriptionManager subscribeForDeletions(IndexNotificationConsumer consumer)
          Subsribes this RemoteDeltaListManager for notifications concerning deletions of data to the index.
 org.globus.wsrf.core.notification.SubscriptionManager subscribeForIndexRemoval(IndexNotificationConsumer consumer)
           
 org.globus.wsrf.core.notification.SubscriptionManager subscribeForManagerCreation(IndexNotificationConsumer consumer)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteDeltaListManager

public RemoteDeltaListManager(java.lang.String indexManagementID,
                              GCUBEServiceContext sctx,
                              java.lang.String managementServiceNamespace)
                       throws java.lang.Exception
Constructs a new RemoteDeltaListManager

Parameters:
indexManagementID - the ID of the index whose delta list is to be managed
sctx - the service context to be used for security and scoping
Throws:
IndexException - an error occurred
java.lang.Exception

RemoteDeltaListManager

public RemoteDeltaListManager(java.lang.String indexManagementID,
                              org.apache.axis.message.addressing.EndpointReferenceType indexManagerEPR,
                              GCUBEServiceContext sctx)
                       throws java.lang.Exception
Constructs a new RemoteDeltaListManager

Parameters:
indexManagementID - the ID of the index whose delta list is to be managed
indexManagerEPR - the EPR of the index manager
sctx - the service context to be used for security and scoping
Throws:
java.lang.Exception - an error occurred
Method Detail

getDeltaCollectionID

public java.lang.String getDeltaCollectionID()
                                      throws java.lang.Exception
Returns a ID of the collection with the delta related documents

Specified by:
getDeltaCollectionID in interface DeltaListManagementWrapper
Returns:
delta collection ID
Throws:
java.lang.Exception - when contacting the DeltaListManagementProviderPortType

setIndexManagerEPR

public void setIndexManagerEPR(org.apache.axis.message.addressing.EndpointReferenceType managerEPR)
                        throws java.lang.Exception
Sets the EPR of the remote delta list manager

Specified by:
setIndexManagerEPR in interface DeltaListManagementWrapper
Parameters:
managerEPR - the EPR of the remote delta list manager
Throws:
java.lang.Exception

getIndexManagerEPR

public org.apache.axis.message.addressing.EndpointReferenceType getIndexManagerEPR()
Specified by:
getIndexManagerEPR in interface DeltaListManagementWrapper

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface DeltaListManagementWrapper

connectUpdater

public ConnectUpdaterResponse connectUpdater()
                                      throws java.lang.Exception
Connects an updater to the index management resource.

Specified by:
connectUpdater in interface DeltaListManagementWrapper
Returns:
ConnectUpdaterResponse the response
Throws:
java.lang.Exception - an error occured

connectLookup

public int connectLookup()
                  throws java.lang.Exception
Connects a lookup to the index management resource.

Specified by:
connectLookup in interface DeltaListManagementWrapper
Returns:
int the new connection ID
Throws:
java.lang.Exception - an error occurred

disconnectUpdater

public void disconnectUpdater(int updaterID)
                       throws java.lang.Exception
Disconnects an updater from the index management resource.

Specified by:
disconnectUpdater in interface DeltaListManagementWrapper
Parameters:
updaterID - the ID of the updater to disconnect
Throws:
java.lang.Exception - an error occurred

getDeltaFileInfo

public DeltaFileInfoType getDeltaFileInfo(int idx)
                                   throws java.lang.Exception
Returns info about a given delta file.

Specified by:
getDeltaFileInfo in interface DeltaListManagementWrapper
Parameters:
idx - the index of delta file in question
Returns:
DeltaFileInfoType the delta file info
Throws:
java.lang.Exception - an error occurred

getDeltaFileList

public DeltaFileInfoType[] getDeltaFileList()
                                     throws java.lang.Exception
Returns the delta file list.

Specified by:
getDeltaFileList in interface DeltaListManagementWrapper
Returns:
DeltaFileInfoType[] info about the delta files that make up the index
Throws:
java.lang.Exception - an error occurred

mergeDeltaFile

public void mergeDeltaFile(DeltaFileInfoType deltaInfo)
                    throws java.lang.Exception
Merges a delta file with the main index.

Specified by:
mergeDeltaFile in interface DeltaListManagementWrapper
Parameters:
deltaInfo - info about the delta file to merge
Throws:
java.lang.Exception - an error occurred

subscribeForAdditions

public org.globus.wsrf.core.notification.SubscriptionManager subscribeForAdditions(IndexNotificationConsumer consumer)
                                                                            throws java.lang.Exception
Subsribes this RemoteDeltaListManager for notifications concerning additions of data to the index.

Specified by:
subscribeForAdditions in interface DeltaListManagementWrapper
Returns:
SubscriptionManager the created subscription manager
Throws:
java.lang.Exception - an error occured

subscribeForDeletions

public org.globus.wsrf.core.notification.SubscriptionManager subscribeForDeletions(IndexNotificationConsumer consumer)
                                                                            throws java.lang.Exception
Subsribes this RemoteDeltaListManager for notifications concerning deletions of data to the index.

Specified by:
subscribeForDeletions in interface DeltaListManagementWrapper
Returns:
SubscriptionManager the created subscription manager
Throws:
java.lang.Exception - an error occured

subscribeForIndexRemoval

public org.globus.wsrf.core.notification.SubscriptionManager subscribeForIndexRemoval(IndexNotificationConsumer consumer)
                                                                               throws java.lang.Exception
Specified by:
subscribeForIndexRemoval in interface DeltaListManagementWrapper
Throws:
java.lang.Exception

subscribeForManagerCreation

public org.globus.wsrf.core.notification.SubscriptionManager subscribeForManagerCreation(IndexNotificationConsumer consumer)
                                                                                  throws java.lang.Exception
Specified by:
subscribeForManagerCreation in interface DeltaListManagementWrapper
Throws:
java.lang.Exception