org.gcube.indexmanagement.storagehandling
Class DeltaListManagementProvider

java.lang.Object
  extended by org.gcube.common.core.porttypes.GCUBEPortType
      extended by org.gcube.indexmanagement.storagehandling.DeltaListManagementProvider
All Implemented Interfaces:
javax.xml.rpc.server.ServiceLifecycle

public class DeltaListManagementProvider
extends org.gcube.common.core.porttypes.GCUBEPortType


Field Summary
 
Fields inherited from class org.gcube.common.core.porttypes.GCUBEPortType
initialized
 
Constructor Summary
DeltaListManagementProvider()
          Constructs a new DeltaListManagementProvider
 
Method Summary
 int connectLookup(org.gcube.indexmanagement.storagehandling.stubs.ConnectLookup empty)
          Creates a connection number to identify an Index replication (Lookup resource)
 org.gcube.indexmanagement.storagehandling.stubs.ConnectUpdaterResponse connectUpdater(org.gcube.indexmanagement.storagehandling.stubs.ConnectUpdater empty)
          Informs the index that an update has started.
 org.gcube.indexmanagement.storagehandling.stubs.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.
 String getDeltaCollectionID(org.gcube.indexmanagement.storagehandling.stubs.GetDeltaCollectionID empty)
          Returns the collection ID of the collection that stores the documents related to deltafiles
 org.gcube.indexmanagement.storagehandling.stubs.DeltaFileInfoType getDeltaFileInfo(int deltaFileIdx)
          Returns a delta file's particulars based on its index (placement in the DeltaFileList)
 org.gcube.indexmanagement.storagehandling.stubs.GetDeltaFileListResponse getDeltaFileList(org.gcube.indexmanagement.storagehandling.stubs.GetDeltaFileList request)
          Returns a list of all retrieved delta files
protected  org.gcube.common.core.contexts.GCUBEServiceContext getServiceContext()
           
 boolean isUpdating(org.gcube.indexmanagement.storagehandling.stubs.IsUpdating empty)
          Informs the caller if the Generator is currently updating
 org.gcube.indexmanagement.storagehandling.stubs.MergeResponse mergeDeltaFile(org.gcube.indexmanagement.storagehandling.stubs.DeltaFileInfoType deltaFileInfo)
          Merges rowset information into an index.
 
Methods inherited from class org.gcube.common.core.porttypes.GCUBEPortType
destroy, init, onFailure, onInitialisation, onReady, onStateChange, onUpdate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeltaListManagementProvider

public DeltaListManagementProvider()
Constructs a new DeltaListManagementProvider

Method Detail

getDeltaFileList

public org.gcube.indexmanagement.storagehandling.stubs.GetDeltaFileListResponse getDeltaFileList(org.gcube.indexmanagement.storagehandling.stubs.GetDeltaFileList request)
                                                                                          throws org.gcube.common.core.faults.GCUBEUnrecoverableFault
Returns a list of all retrieved delta files

Parameters:
request - the request
Returns:
GetDeltaFileListResponse true if updating
Throws:
org.gcube.common.core.faults.GCUBEUnrecoverableFault - an error occured

getDeltaFileInfo

public org.gcube.indexmanagement.storagehandling.stubs.DeltaFileInfoType getDeltaFileInfo(int deltaFileIdx)
                                                                                   throws org.gcube.common.core.faults.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:
org.gcube.common.core.faults.GCUBEUnrecoverableFault - an error occured

getDeltaCollectionID

public String getDeltaCollectionID(org.gcube.indexmanagement.storagehandling.stubs.GetDeltaCollectionID empty)
                            throws org.gcube.common.core.faults.GCUBEUnrecoverableFault
Returns the collection ID of the collection that stores the documents related to deltafiles

Returns:
String the deltafile collection ID
Throws:
org.gcube.common.core.faults.GCUBEUnrecoverableFault

mergeDeltaFile

public org.gcube.indexmanagement.storagehandling.stubs.MergeResponse mergeDeltaFile(org.gcube.indexmanagement.storagehandling.stubs.DeltaFileInfoType deltaFileInfo)
                                                                             throws org.gcube.common.core.faults.GCUBEUnrecoverableFault
Merges rowset information into an index.

Parameters:
deltaFileInfo - the delta file to merge
Returns:
MergeResponse empty stub response
Throws:
org.gcube.common.core.faults.GCUBEUnrecoverableFault - an error occured

connectLookup

public int connectLookup(org.gcube.indexmanagement.storagehandling.stubs.ConnectLookup empty)
                  throws org.gcube.common.core.faults.GCUBEUnrecoverableFault
Creates a connection number to identify an Index replication (Lookup resource)

Parameters:
empty - empty stub request
Returns:
int the new connection ID
Throws:
org.gcube.common.core.faults.GCUBEUnrecoverableFault - an error occured

connectUpdater

public org.gcube.indexmanagement.storagehandling.stubs.ConnectUpdaterResponse connectUpdater(org.gcube.indexmanagement.storagehandling.stubs.ConnectUpdater empty)
                                                                                      throws org.gcube.common.core.faults.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:
org.gcube.common.core.faults.GCUBEUnrecoverableFault - an error occured

disconnectUpdater

public org.gcube.indexmanagement.storagehandling.stubs.DisconnectUpdaterResponse disconnectUpdater(int updaterID)
                                                                                            throws org.gcube.common.core.faults.GCUBEUnrecoverableFault
Informs the index that an update is finished.

Parameters:
updaterID - ID of the finished updater resource
Returns:
DisconnectUpdaterResponse empty stub response
Throws:
org.gcube.common.core.faults.GCUBEUnrecoverableFault - an error occured

isUpdating

public boolean isUpdating(org.gcube.indexmanagement.storagehandling.stubs.IsUpdating empty)
                   throws org.gcube.common.core.faults.GCUBEUnrecoverableFault
Informs the caller if the Generator is currently updating

Parameters:
empty - empty stub request
Returns:
boolean true if updating
Throws:
org.gcube.common.core.faults.GCUBEUnrecoverableFault - an error occured

getServiceContext

protected org.gcube.common.core.contexts.GCUBEServiceContext getServiceContext()
Specified by:
getServiceContext in class org.gcube.common.core.porttypes.GCUBEPortType

getCurrentMessage

public org.oasis.wsn.GetCurrentMessageResponse getCurrentMessage(org.oasis.wsn.GetCurrentMessage request)
                                                          throws 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:
RemoteException
org.oasis.wsn.ResourceUnknownFaultType
org.oasis.wsn.InvalidTopicExpressionFaultType
org.oasis.wsn.TopicNotSupportedFaultType
org.oasis.wsn.NoCurrentMessageOnTopicFaultType


Copyright © 2013. All Rights Reserved.