org.gcube.indexmanagement.storagehandling
Class DeltaListManagementProvider

java.lang.Object
  extended by GCUBEPortType
      extended by org.gcube.indexmanagement.storagehandling.DeltaListManagementProvider

public class DeltaListManagementProvider
extends GCUBEPortType


Constructor Summary
DeltaListManagementProvider()
          Constructs a new DeltaListManagementProvider
 
Method Summary
 int connectLookup(ConnectLookup empty)
          Creates a connection number to identify an Index replication (Lookup resource)
 ConnectUpdaterResponse connectUpdater(ConnectUpdater empty)
          Informs the index that an update has started.
 DisconnectUpdaterResponse disconnectUpdater(int updaterID)
          Informs the index that an update is finished.
 org.oasis.wsn.GetCurrentMessageResponse getCurrentMessage(org.oasis.wsn.GetCurrentMessage request)
          Provider for the getCurrentMessage operation of the notification producer.
 java.lang.String getDeltaCollectionID(GetDeltaCollectionID empty)
          Returns the collection ID of the collection that stores the documents related to deltafiles
 DeltaFileInfoType getDeltaFileInfo(int deltaFileIdx)
          Returns a delta file's particulars based on its index (placement in the DeltaFileList)
 GetDeltaFileListResponse getDeltaFileList(GetDeltaFileList request)
          Returns a list of all retrieved delta files
 boolean isUpdating(IsUpdating empty)
          Informs the caller if the Generator is currently updating
 MergeResponse mergeDeltaFile(DeltaFileInfoType deltaFileInfo)
          Merges rowset information into an index.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeltaListManagementProvider

public DeltaListManagementProvider()
Constructs a new DeltaListManagementProvider

Method Detail

getDeltaFileList

public GetDeltaFileListResponse getDeltaFileList(GetDeltaFileList request)
                                          throws GCUBEUnrecoverableFault
Returns a list of all retrieved delta files

Parameters:
request - the request
Returns:
GetDeltaFileListResponse true if updating
Throws:
GCUBEUnrecoverableFault - an error occured

getDeltaFileInfo

public DeltaFileInfoType getDeltaFileInfo(int deltaFileIdx)
                                   throws GCUBEUnrecoverableFault
Returns a delta file's particulars based on its index (placement in the DeltaFileList)

Parameters:
deltaFileIdx - The index of the DeltaFile in question
Returns:
DeltaFileInfoType The particulars of the DeltaFile in question
Throws:
GCUBEUnrecoverableFault - an error occured

getDeltaCollectionID

public java.lang.String getDeltaCollectionID(GetDeltaCollectionID empty)
                                      throws GCUBEUnrecoverableFault
Returns the collection ID of the collection that stores the documents related to deltafiles

Returns:
String the deltafile collection ID
Throws:
GCUBEUnrecoverableFault

mergeDeltaFile

public MergeResponse mergeDeltaFile(DeltaFileInfoType deltaFileInfo)
                             throws GCUBEUnrecoverableFault
Merges rowset information into an index.

Parameters:
deltaFileInfo - the delta file to merge
Returns:
MergeResponse empty stub response
Throws:
GCUBEUnrecoverableFault - an error occured

connectLookup

public int connectLookup(ConnectLookup empty)
                  throws GCUBEUnrecoverableFault
Creates a connection number to identify an Index replication (Lookup resource)

Parameters:
empty - empty stub request
Returns:
int the new connection ID
Throws:
GCUBEUnrecoverableFault - an error occured

connectUpdater

public ConnectUpdaterResponse connectUpdater(ConnectUpdater empty)
                                      throws GCUBEUnrecoverableFault
Informs the index that an update has started.

Parameters:
empty - empty stub request
Returns:
ConnectUpdaterResponse the connectionID of this connection and the collectionID to upload deltaFiles to
Throws:
GCUBEUnrecoverableFault - an error occured

disconnectUpdater

public DisconnectUpdaterResponse disconnectUpdater(int updaterID)
                                            throws GCUBEUnrecoverableFault
Informs the index that an update is finished.

Parameters:
updaterID - ID of the finished updater resource
Returns:
DisconnectUpdaterResponse empty stub response
Throws:
GCUBEUnrecoverableFault - an error occured

isUpdating

public boolean isUpdating(IsUpdating empty)
                   throws GCUBEUnrecoverableFault
Informs the caller if the Generator is currently updating

Parameters:
empty - empty stub request
Returns:
boolean true if updating
Throws:
GCUBEUnrecoverableFault - an error occured

getCurrentMessage

public org.oasis.wsn.GetCurrentMessageResponse getCurrentMessage(org.oasis.wsn.GetCurrentMessage request)
                                                          throws java.rmi.RemoteException,
                                                                 org.oasis.wsn.ResourceUnknownFaultType,
                                                                 org.oasis.wsn.InvalidTopicExpressionFaultType,
                                                                 org.oasis.wsn.TopicNotSupportedFaultType,
                                                                 org.oasis.wsn.NoCurrentMessageOnTopicFaultType
Provider for the getCurrentMessage operation of the notification producer. If the topic whose current message is requested is the "delta file added" or "delta file deleted" topic, then don't return any message, because: If a consumer (index lookup resource) goes down and comes back again, it will get the previously sent message again upon re-subscribing, effectively adding or deleting the same data more than one time. For every other topic, the request is dispatched to the default, generic getCurrentMessage provider which returns the last message sent by the producer on this topic.

Parameters:
request - the request
Returns:
the current message
Throws:
java.rmi.RemoteException
org.oasis.wsn.ResourceUnknownFaultType
org.oasis.wsn.InvalidTopicExpressionFaultType
org.oasis.wsn.TopicNotSupportedFaultType
org.oasis.wsn.NoCurrentMessageOnTopicFaultType