|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SearchEngineIndexManager
| Nested Class Summary | |
|---|---|
static interface |
SearchEngineIndexManager.IndexOperationCallback
A callback interface that works with. |
static interface |
SearchEngineIndexManager.IndexOperationPlan
|
static interface |
SearchEngineIndexManager.ReplaceIndexCallback
A callback to replace the current index. |
| Method Summary | |
|---|---|
String[] |
calcSubIndexes(String[] subIndexes,
String[] aliases,
Class[] types)
Returns the sub indexes the intersect with the given sub indexes and aliases provided. |
void |
checkAndClearIfNotifiedAllToClearCache()
Manual check if the notified to clear the cache globally. |
void |
cleanIndex()
Cleans the index from data (by deleting and creating an empty one). |
void |
cleanIndex(String subIndex)
Cleans the index from data (by deleting and creating an empty one). |
void |
clearCache()
Clears any internal caching done by the index. |
void |
clearCache(String subIndex)
Clears any internal caching done by the index for the specified sub-index. |
void |
close()
Closes the index manager. |
void |
createIndex()
Creates an index data. |
void |
deleteIndex()
Deletes the index. |
String[] |
getSubIndexes()
Returns the sub indexes that Compass handles. |
boolean |
indexExists()
Returns true if the index exists. |
boolean |
isCached()
Returns true if one of the sub indexes is cached. |
boolean |
isCached(String subIndex)
Returns true if the sub index is cached. |
boolean |
isLocked()
Returns true if one of the sub indexes is locked. |
boolean |
isLocked(String subIndex)
Returns true if the given sub index is locked. |
boolean |
isRunning()
Returns true if the index manage is running |
void |
notifyAllToClearCache()
Notifies all the compass instances that are working with the same index to clear cache. |
void |
operate(SearchEngineIndexManager.IndexOperationCallback callback)
A general api for index operations. |
void |
performScheduledTasks()
Performs scheduled tasks that are usually derived basde on the actual index storage used. |
String[] |
polyCalcSubIndexes(String[] subIndexes,
String[] aliases,
Class[] types)
Returns the sub indexes that intersect with the given sub indexes, aliases and types. |
void |
refreshCache()
Refresh any internal caching done by the index. |
void |
refreshCache(String subIndex)
Refresh any internal caching done by the index for the specified sub-index. |
void |
releaseLock(String subIndex)
Releases a lock for the given sub index. |
void |
releaseLocks()
Releases all the locks held over all the possbile sub indexes. |
void |
replaceIndex(SearchEngineIndexManager indexManager,
SearchEngineIndexManager.ReplaceIndexCallback callback)
Replaces the index data that is used by the current instance, with the one that is pointed by the given indexManager. |
boolean |
requiresAsyncTransactionalContext()
Returns true if a transaction needs to be started when performing operations
with this store. |
void |
start()
Starts the index manager |
void |
stop()
Stops / closes the index manager |
boolean |
subIndexExists(String subIndex)
Returns true if the sub index exists. |
boolean |
supportsConcurrentOperations()
Returns true if the index store supports concurrent operations. |
boolean |
verifyIndex()
Verify the index data. |
| Method Detail |
|---|
void start()
void stop()
boolean isRunning()
true if the index manage is running
void close()
void createIndex()
throws SearchEngineException
SearchEngineException
boolean verifyIndex()
throws SearchEngineException
true if the index was created. If the index
exists, and it's LuceneEnvironment.SearchEngineIndex.USE_COMPOUND_FILE
changed it's settings, will compound / un-compound the index accordingly.
SearchEngineException
void deleteIndex()
throws SearchEngineException
SearchEngineException
void cleanIndex()
throws SearchEngineException
SearchEngineException
void cleanIndex(String subIndex)
throws SearchEngineException
SearchEngineException
boolean indexExists()
throws SearchEngineException
true if the index exists.
SearchEngineException
void operate(SearchEngineIndexManager.IndexOperationCallback callback)
throws SearchEngineException
SearchEngineIndexManager.IndexOperationCallback.
SearchEngineException
void replaceIndex(SearchEngineIndexManager indexManager,
SearchEngineIndexManager.ReplaceIndexCallback callback)
throws SearchEngineException
indexManager. A callback interface can be registered if the index is
dynamically created.
The replace process is safe, in terms that it will aquire dirty locks and read locks, so the index can be safely replaced while it is being used.
SearchEngineException
boolean isCached(String subIndex)
throws SearchEngineException
true if the sub index is cached.
SearchEngineException
boolean isCached()
throws SearchEngineException
true if one of the sub indexes is cached.
SearchEngineException
void clearCache(String subIndex)
throws SearchEngineException
SearchEngineException
void clearCache()
throws SearchEngineException
SearchEngineException
void refreshCache(String subIndex)
throws SearchEngineException
SearchEngineException
void refreshCache()
throws SearchEngineException
SearchEngineException
void notifyAllToClearCache()
throws SearchEngineException
SearchEngineException
void checkAndClearIfNotifiedAllToClearCache()
throws SearchEngineException
SearchEngineException
void performScheduledTasks()
throws SearchEngineException
This API will be called when disabling the automatic scheduler that comes built in with Compass.
SearchEngineExceptionString[] getSubIndexes()
boolean subIndexExists(String subIndex)
true if the sub index exists.
void releaseLocks()
throws SearchEngineException
SearchEngineException
void releaseLock(String subIndex)
throws SearchEngineException
SearchEngineException
boolean isLocked()
throws SearchEngineException
true if one of the sub indexes is locked.
SearchEngineException
boolean isLocked(String subIndex)
throws SearchEngineException
true if the given sub index is locked.
SearchEngineException
String[] calcSubIndexes(String[] subIndexes,
String[] aliases,
Class[] types)
String[] polyCalcSubIndexes(String[] subIndexes,
String[] aliases,
Class[] types)
boolean requiresAsyncTransactionalContext()
true if a transaction needs to be started when performing operations
with this store.
boolean supportsConcurrentOperations()
true if the index store supports concurrent operations.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||