org.gcube.indexmanagement.storagehandling
Class DeltaListManagementHandler

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

public class DeltaListManagementHandler
extends java.lang.Object


Constructor Summary
DeltaListManagementHandler()
           
DeltaListManagementHandler(IndexManagementWSResource resource, java.lang.String stateFilename)
           
 
Method Summary
 void close()
          Closes the delta list management handler by performing clean up.
 int connectLookup()
           
 int connectUpdater()
           
 void disconnectUpdater(int connectionID)
           
 java.lang.String getDeltaFileCollectionID()
           
 DeltaFileInfoType getDeltaFileInfo(int idx)
           
 DeltaFileInfoType[] getDeltaFileList()
           
 IndexWSResource getResource()
           
 boolean isUpdating()
           
 void loadState(java.io.ObjectInputStream ois, boolean firstLoad, IndexManagementWSResource resource)
          Loads the current state of this DeltaListManagementHandler from an object stream.
 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(java.io.ObjectOutputStream oos)
          Stores the current state of this DeltaListManagementHandler to an object stream.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeltaListManagementHandler

public DeltaListManagementHandler()

DeltaListManagementHandler

public DeltaListManagementHandler(IndexManagementWSResource resource,
                                  java.lang.String stateFilename)
                           throws IndexException
Throws:
IndexException
Method Detail

storeState

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

Parameters:
oos - the output stream

loadState

public void loadState(java.io.ObjectInputStream ois,
                      boolean firstLoad,
                      IndexManagementWSResource resource)
               throws java.lang.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:
java.lang.Exception

connectLookup

public int connectLookup()
                  throws IndexException
Throws:
IndexException

connectUpdater

public int connectUpdater()
                   throws IndexException
Throws:
IndexException

disconnectUpdater

public void disconnectUpdater(int connectionID)

getDeltaFileInfo

public DeltaFileInfoType getDeltaFileInfo(int idx)

getDeltaFileList

public 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 IndexWSResource getResource()

getDeltaFileCollectionID

public java.lang.String getDeltaFileCollectionID()