org.gcube.indexmanagement.storagehandling
Class DeltaListManagementHandler

java.lang.Object
  extended by org.gcube.indexmanagement.storagehandling.DeltaListManagementHandler

public class DeltaListManagementHandler
extends Object


Constructor Summary
DeltaListManagementHandler()
           
DeltaListManagementHandler(org.gcube.indexmanagement.common.IndexManagementWSResource resource, String stateFilename)
           
 
Method Summary
 void close()
          Closes the delta list management handler by performing clean up.
 int connectLookup()
           
 int connectUpdater()
           
 void disconnectUpdater(int connectionID)
           
 String getDeltaFileCollectionID()
           
 org.gcube.indexmanagement.storagehandling.stubs.DeltaFileInfoType getDeltaFileInfo(int idx)
           
 org.gcube.indexmanagement.storagehandling.stubs.DeltaFileInfoType[] getDeltaFileList()
           
 org.gcube.indexmanagement.common.IndexWSResource getResource()
           
 boolean isUpdating()
           
 void loadState(ObjectInputStream ois, boolean firstLoad, org.gcube.indexmanagement.common.IndexManagementWSResource resource)
          Loads the current state of this DeltaListManagementHandler from an object stream.
protected  void mergeDeltaFile(org.gcube.indexmanagement.storagehandling.stubs.DeltaFileInfoType deltaInfo, boolean bSendUpdateNotification)
           
 void setIndexResourceScopeToDeltaListManagementScope()
          Sets the scope of the current thread in the service context of the index resource to the scope of the current thread as given by the DeltaListManagementHandler's ServiceContext.
 void storeState(ObjectOutputStream oos)
          Stores the current state of this DeltaListManagementHandler to an object stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeltaListManagementHandler

public DeltaListManagementHandler()

DeltaListManagementHandler

public DeltaListManagementHandler(org.gcube.indexmanagement.common.IndexManagementWSResource resource,
                                  String stateFilename)
                           throws org.gcube.indexmanagement.common.IndexException
Throws:
org.gcube.indexmanagement.common.IndexException
Method Detail

storeState

public void storeState(ObjectOutputStream oos)
Stores the current state of this DeltaListManagementHandler to an object stream.

Parameters:
oos - the output stream

loadState

public void loadState(ObjectInputStream ois,
                      boolean firstLoad,
                      org.gcube.indexmanagement.common.IndexManagementWSResource resource)
               throws Exception
Loads the current state of this DeltaListManagementHandler from an object stream.

Parameters:
ois - the input stream
firstLoad - specifies whether this is the first load or not
resource - the manager resource associated with this DeltaListManagementHandler
Throws:
Exception

connectLookup

public int connectLookup()
                  throws org.gcube.indexmanagement.common.IndexException
Throws:
org.gcube.indexmanagement.common.IndexException

connectUpdater

public int connectUpdater()
                   throws org.gcube.indexmanagement.common.IndexException
Throws:
org.gcube.indexmanagement.common.IndexException

disconnectUpdater

public void disconnectUpdater(int connectionID)

mergeDeltaFile

protected void mergeDeltaFile(org.gcube.indexmanagement.storagehandling.stubs.DeltaFileInfoType deltaInfo,
                              boolean bSendUpdateNotification)
                       throws Exception
Throws:
Exception

getDeltaFileInfo

public org.gcube.indexmanagement.storagehandling.stubs.DeltaFileInfoType getDeltaFileInfo(int idx)

getDeltaFileList

public org.gcube.indexmanagement.storagehandling.stubs.DeltaFileInfoType[] getDeltaFileList()

close

public void close()
Closes the delta list management handler by performing clean up. Must be called when an index management resource is being destroyed.


setIndexResourceScopeToDeltaListManagementScope

public void setIndexResourceScopeToDeltaListManagementScope()
Sets the scope of the current thread in the service context of the index resource to the scope of the current thread as given by the DeltaListManagementHandler's ServiceContext. This method is used when an operation of the StorageHandling layer is directly invoked, so the index resource's service context does not define a scope for the current thread because an operation of the index resource has not been invoked. However, everything is done based on the scope of the index resource's ServiceContext, so it is required to copy this scope.


isUpdating

public boolean isUpdating()

getResource

public org.gcube.indexmanagement.common.IndexWSResource getResource()

getDeltaFileCollectionID

public String getDeltaFileCollectionID()


Copyright © 2013. All Rights Reserved.