org.sakaiproject.search.index
Interface ClusterFilesystem

All Known Implementing Classes:
JDBCClusterIndexStore

public interface ClusterFilesystem

ClusterFilesystem provides the mechanism by which the local search index is syncronsed with the clustered file system

Author:
ieb

Method Summary
 boolean centralIndexExists()
          A low cost reliable mechanism for determining if an index exists in the cluster
 long getLastUpdate()
           
 void getLock()
          if the thread already has a lock ignore get a lock on the index so that it can be updated this should block untill a lock becomes free
 List getSegmentInfoList()
           
 File getTemporarySegment(boolean delete)
          get a clean temporary index space for building a detached segment
 boolean isMultipleIndexers()
          can the Cluster Filesystem cope with multiple indexers running at the same time
 SegmentInfo newSegment()
          create a new segment
 void recoverSegment(SegmentInfo segment)
          Recover a dammaged segment from the DB
 void releaseLock()
          release the lock, only if there is one this should block untill a lock becomes free
 void removeLocalSegment(SegmentInfo mergeSegment)
          Remove a segment from the index.
 void removeTemporarySegment()
          removes the temporary segment
 List<SegmentInfo> saveAllSegments()
          Forces all segments from this system into the DB, does not delete any inthe db.
 List<SegmentInfo> saveSegments()
          saves the segments returning a list of segments that were sent to the central store
 SegmentInfo saveTemporarySegment()
          Save the temporary segment into a permanent segment
 void setLocation(String location)
          set the location information for the cluster file store
 List<SegmentInfo> updateSegments()
          Update all the segments in the cluster file system, retruning a list of segment names with the current segment as the last in the list.
 

Method Detail

updateSegments

List<SegmentInfo> updateSegments()
Update all the segments in the cluster file system, retruning a list of segment names with the current segment as the last in the list.

Returns:

saveSegments

List<SegmentInfo> saveSegments()
saves the segments returning a list of segments that were sent to the central store

Returns:

saveAllSegments

List<SegmentInfo> saveAllSegments()
Forces all segments from this system into the DB, does not delete any inthe db.

Returns:

newSegment

SegmentInfo newSegment()
                       throws IOException
create a new segment

Returns:
Throws:
IOException

setLocation

void setLocation(String location)
set the location information for the cluster file store

Parameters:
location -

getTemporarySegment

File getTemporarySegment(boolean delete)
get a clean temporary index space for building a detached segment

Parameters:
delete - if true the temp index will be deleted first, there is only 1 temp index per location
Returns:

removeTemporarySegment

void removeTemporarySegment()
removes the temporary segment


recoverSegment

void recoverSegment(SegmentInfo segment)
Recover a dammaged segment from the DB

Parameters:
segment -

removeLocalSegment

void removeLocalSegment(SegmentInfo mergeSegment)
Remove a segment from the index.

Parameters:
mergeSegment -

getLastUpdate

long getLastUpdate()

getSegmentInfoList

List getSegmentInfoList()

getLock

void getLock()
             throws IOException
if the thread already has a lock ignore get a lock on the index so that it can be updated this should block untill a lock becomes free

Throws:
IOException

releaseLock

void releaseLock()
release the lock, only if there is one this should block untill a lock becomes free


isMultipleIndexers

boolean isMultipleIndexers()
can the Cluster Filesystem cope with multiple indexers running at the same time

Returns:

saveTemporarySegment

SegmentInfo saveTemporarySegment()
                                 throws IOException
Save the temporary segment into a permanent segment

Returns:
Throws:
IOException

centralIndexExists

boolean centralIndexExists()
A low cost reliable mechanism for determining if an index exists in the cluster

Returns:


Copyright © 2003-2012 Sakai Project. All Rights Reserved.