- All Implemented Interfaces:
- SearchResultSource
public class DynamicCDXIndex
extends CompositeSearchResultSource
A CompositeSearchResultSource that autmatically manages it's list of sources
based on 3 configuration files, and a background thread:
Config 1: Mapping of ranges to hosts responsible for that range
this class is aware of the local host name, so uses this file
to determin which range(s) should be local
Config 2: Mapping of ranges to one or more MD5s that compose that range
when all of these MD5s have been copied local, this index
becomes active, and each request uses a composite of these
local files
Config 3: Mapping of MD5s to locations from which they can be retrieved
when a file that should be local is missing, these locations
will be used to retrieve a copy of that file
Background Thread: compares current set of files to the various
configurations files, gets files local that need to be and
updates the composite set searched when the correct set of
MD5s are localized.
The Thread maintains the state of the sychronization with the desired file
set:
UNKNOWN: If the desired state is unknown
SYNCHING: If the local state does not match the desired state
SYNCHED: If the local stat matches the desired state
This class forwards all method requests to the superclass, if the state is
SYNCHED, otherwise throws a ResourceIndexNotAvailableException.
- Version:
- $Date$, $Revision$
- Author:
- brad