| java.lang.Object org.space4j.indexing.IndexManager
IndexManager | public class IndexManager implements Serializable,Observer(Code) | | IndexManager will control all indexes of your space.
It will create Maps for each index and observe changes in your objects.
IndexManager is serializaded together with the space.
|
Method Summary | |
public void | add(Object obj) Insert an object in this IndexManager. | public boolean | checkIndex(Index indx) Check to see if this index exists.
Parameters: indx - The index we are looking for. | public boolean | createIndex(Index indx, String sourcemap, Map map, Space4J space4j) Create an index in the system.
Parameters: indx - The index to be created. Parameters: sourcemap - The map where the objects are stored. Parameters: map - The new map used by this new index. Parameters: space4j - The space4j were this command will be executed. | boolean | createIndexImpl(Index indx, Collection list, Map map) | public boolean | dropIndex(Index indx, Space4J space4j) Drop an index from the system.
Parameters: indx - The index to drop Parameters: space4j - The space4j where this command will be executed. | boolean | dropIndexImpl(Index indx) | public ArrayList | findIndexes(Class klass, String attribute) Find all indexes of a Class with a given attribute.
Parameters: klass - The class whose indexes we are looking for. Parameters: attribute - The attribute whose indexes we are looking for. | public Map | getIndexedMap(Index indx) Return a Map with the objects indexed.
You will use these maps to query your objects.
Parameters: indx - The index we are talking about. | public Iterator | getIndexes(Class klass) Return an iterator with all indexes for a given Class.
Parameters: klass - The class whose indexes we are looking for. | public void | remove(Object obj) Remove an object from this IndexManager. | public void | update(Observable o, Object arg) Obsersable objects will notify their changes to the IndexManager through this method. |
add | public void add(Object obj)(Code) | | Insert an object in this IndexManager.
Parameters: obj - The object to be inserted. |
checkIndex | public boolean checkIndex(Index indx)(Code) | | Check to see if this index exists.
Parameters: indx - The index we are looking for. True if the index exists. |
createIndex | public boolean createIndex(Index indx, String sourcemap, Map map, Space4J space4j) throws CommandException, LoggerException(Code) | | Create an index in the system.
Parameters: indx - The index to be created. Parameters: sourcemap - The map where the objects are stored. Parameters: map - The new map used by this new index. Parameters: space4j - The space4j were this command will be executed. True if the index was created. |
dropIndex | public boolean dropIndex(Index indx, Space4J space4j) throws CommandException, LoggerException(Code) | | Drop an index from the system.
Parameters: indx - The index to drop Parameters: space4j - The space4j where this command will be executed. boolean True if the index was dropped. |
findIndexes | public ArrayList findIndexes(Class klass, String attribute)(Code) | | Find all indexes of a Class with a given attribute.
Parameters: klass - The class whose indexes we are looking for. Parameters: attribute - The attribute whose indexes we are looking for. ArrayList The indexes found in the system. |
getIndexedMap | public Map getIndexedMap(Index indx)(Code) | | Return a Map with the objects indexed.
You will use these maps to query your objects.
Parameters: indx - The index we are talking about. A map with the objects indexed. |
getIndexes | public Iterator getIndexes(Class klass)(Code) | | Return an iterator with all indexes for a given Class.
Parameters: klass - The class whose indexes we are looking for. Iterator The indexes of this class. |
remove | public void remove(Object obj)(Code) | | Remove an object from this IndexManager.
Parameters: obj - The object to be removed. |
update | public void update(Observable o, Object arg)(Code) | | Obsersable objects will notify their changes to the IndexManager through this method.
|
|
|