org.gcube.indexmanagement.storagehandling
Class RemoteDeltaListManager

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

public class RemoteDeltaListManager
extends Object
implements DeltaListManagementWrapper


Constructor Summary
RemoteDeltaListManager(String indexManagementID, org.apache.axis.message.addressing.EndpointReferenceType indexManagerEPR, org.gcube.common.core.contexts.GCUBEServiceContext sctx)
          Constructs a new RemoteDeltaListManager
RemoteDeltaListManager(String indexManagementID, org.gcube.common.core.contexts.GCUBEServiceContext sctx, String managementServiceNamespace)
          Constructs a new RemoteDeltaListManager
 
Method Summary
 int connectLookup()
          Connects a lookup to the index management resource.
 org.gcube.indexmanagement.storagehandling.stubs.ConnectUpdaterResponse connectUpdater()
          Connects an updater to the index management resource.
 void disconnectUpdater(int updaterID)
          Disconnects an updater from the index management resource.
 String getDeltaCollectionID()
          Returns a ID of the collection with the delta related documents
 org.gcube.indexmanagement.storagehandling.stubs.DeltaFileInfoType getDeltaFileInfo(int idx)
          Returns info about a given delta file.
 org.gcube.indexmanagement.storagehandling.stubs.DeltaFileInfoType[] getDeltaFileList()
          Returns the delta file list.
 org.apache.axis.message.addressing.EndpointReferenceType getIndexManagerEPR()
           
 boolean isEmpty()
           
 void mergeDeltaFile(org.gcube.indexmanagement.storagehandling.stubs.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(org.gcube.indexmanagement.common.IndexNotificationConsumer consumer)
          Subsribes this RemoteDeltaListManager for notifications concerning additions of data to the index.
 org.globus.wsrf.core.notification.SubscriptionManager subscribeForDeletions(org.gcube.indexmanagement.common.IndexNotificationConsumer consumer)
          Subsribes this RemoteDeltaListManager for notifications concerning deletions of data to the index.
 org.globus.wsrf.core.notification.SubscriptionManager subscribeForIndexRemoval(org.gcube.indexmanagement.common.IndexNotificationConsumer consumer)
           
 org.globus.wsrf.core.notification.SubscriptionManager subscribeForManagerCreation(org.gcube.indexmanagement.common.IndexNotificationConsumer consumer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteDeltaListManager

public RemoteDeltaListManager(String indexManagementID,
                              org.gcube.common.core.contexts.GCUBEServiceContext sctx,
                              String managementServiceNamespace)
                       throws 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:
org.gcube.indexmanagement.common.IndexException - an error occurred
Exception

RemoteDeltaListManager

public RemoteDeltaListManager(String indexManagementID,
                              org.apache.axis.message.addressing.EndpointReferenceType indexManagerEPR,
                              org.gcube.common.core.contexts.GCUBEServiceContext sctx)
                       throws 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:
Exception - an error occurred
Method Detail

getDeltaCollectionID

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

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

setIndexManagerEPR

public void setIndexManagerEPR(org.apache.axis.message.addressing.EndpointReferenceType managerEPR)
                        throws 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:
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 org.gcube.indexmanagement.storagehandling.stubs.ConnectUpdaterResponse connectUpdater()
                                                                                      throws Exception
Connects an updater to the index management resource.

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

connectLookup

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

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

disconnectUpdater

public void disconnectUpdater(int updaterID)
                       throws 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:
Exception - an error occurred

getDeltaFileInfo

public org.gcube.indexmanagement.storagehandling.stubs.DeltaFileInfoType getDeltaFileInfo(int idx)
                                                                                   throws 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:
Exception - an error occurred

getDeltaFileList

public org.gcube.indexmanagement.storagehandling.stubs.DeltaFileInfoType[] getDeltaFileList()
                                                                                     throws 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:
Exception - an error occurred

mergeDeltaFile

public void mergeDeltaFile(org.gcube.indexmanagement.storagehandling.stubs.DeltaFileInfoType deltaInfo)
                    throws 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:
Exception - an error occurred

subscribeForAdditions

public org.globus.wsrf.core.notification.SubscriptionManager subscribeForAdditions(org.gcube.indexmanagement.common.IndexNotificationConsumer consumer)
                                                                            throws 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:
Exception - an error occured

subscribeForDeletions

public org.globus.wsrf.core.notification.SubscriptionManager subscribeForDeletions(org.gcube.indexmanagement.common.IndexNotificationConsumer consumer)
                                                                            throws 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:
Exception - an error occured

subscribeForIndexRemoval

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

subscribeForManagerCreation

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


Copyright © 2013. All Rights Reserved.