|
Cumulus4j API (1.1.1) |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.cumulus4j.store.datastoreversion.AbstractDatastoreVersionCommand org.cumulus4j.store.datastoreversion.command.RecreateIndex
public class RecreateIndex
Delete all IndexEntry
s from the datastore and then iterate all
DataEntry
s and re-index them.
TODO This class currently does not yet ensure that different keys are used. Thus, very likely the entire index uses only one single key. This should be improved in a future version.
Nested Class Summary | |
---|---|
protected static class |
RecreateIndex.DataEntryWithClassName
|
Field Summary | |
---|---|
protected static String |
PROPERTY_CREATE_FROM_DATA_ENTRY_ID
|
protected static String |
PROPERTY_DELETE_COMPLETE
|
protected static String |
PROPERTY_DELETE_FROM_INDEX_ENTRY_ID
|
Constructor Summary | |
---|---|
RecreateIndex()
|
Method Summary | |
---|---|
void |
apply(CommandApplyParam commandApplyParam)
Perform the upgrade or do whatever this command has to do. |
protected void |
createIndex()
|
protected void |
createIndexForRange(long fromDataEntryIDIncl,
Long toDataEntryIDExcl)
|
protected void |
deleteIndex()
|
protected void |
deleteIndexForRange(long fromIndexEntryIDIncl,
Long toIndexEntryIDExcl)
|
int |
getCommandVersion()
Get the version of this command. |
protected List<RecreateIndex.DataEntryWithClassName> |
getDataEntries(long fromDataEntryIDIncl,
Long toDataEntryIDExcl)
|
protected List<IndexEntry> |
getIndexEntries(Class<? extends IndexEntry> indexEntryClass,
long fromIndexEntryIDIncl,
Long toIndexEntryIDExcl)
|
protected List<IndexEntry> |
getIndexEntries(long fromIndexEntryIDIncl,
Long toIndexEntryIDExcl)
|
protected Set<Class<? extends IndexEntry>> |
getIndexEntryClasses()
|
protected long |
getMaxDataEntryID()
|
protected Long |
getMaxIndexEntryID()
|
protected long |
getMinDataEntryID()
|
protected Long |
getMinIndexEntryID()
|
protected Long |
getMinMaxDataEntryID(String minMax)
|
protected Long |
getMinMaxIndexEntryID(Class<? extends IndexEntry> indexEntryClass,
String minMax)
|
protected Long |
getMinMaxIndexEntryID(String minMax,
Comparator<Long> comparator)
|
boolean |
isFinal()
Is this command final, i.e. |
boolean |
isKeyStoreDependent()
Is this command dependent on the key-store? If yes, it is applied separately for every key-store, i.e. |
Methods inherited from class org.cumulus4j.store.datastoreversion.AbstractDatastoreVersionCommand |
---|
getCommandID |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String PROPERTY_DELETE_COMPLETE
protected static final String PROPERTY_DELETE_FROM_INDEX_ENTRY_ID
protected static final String PROPERTY_CREATE_FROM_DATA_ENTRY_ID
Constructor Detail |
---|
public RecreateIndex()
Method Detail |
---|
public int getCommandVersion()
DatastoreVersionCommand
This version must be incremented, if this command is modified!
Note, that a final
command cannot be modified!!! You can only modify a final command
if this command was newly introduced in the current SNAPSHOT. Never modify a command after it
was released!!!
public boolean isFinal()
DatastoreVersionCommand
isFinal
in interface DatastoreVersionCommand
isFinal
in class AbstractDatastoreVersionCommand
true
, if this command is final; false
otherwise.public boolean isKeyStoreDependent()
DatastoreVersionCommand
keyStoreRefID
s. If no, it is applied only once
globally
.
isKeyStoreDependent
in interface DatastoreVersionCommand
isKeyStoreDependent
in class AbstractDatastoreVersionCommand
true
, if this command should be applied once per key-store (and per underlying PersistenceManager
[there might be two if data and index is stored separately]); false
otherwise.public void apply(CommandApplyParam commandApplyParam)
DatastoreVersionCommand
commandApplyParam
- various arguments bundled for better compatibility with future extensions. Never null
.protected void deleteIndex()
protected void deleteIndexForRange(long fromIndexEntryIDIncl, Long toIndexEntryIDExcl)
protected List<IndexEntry> getIndexEntries(long fromIndexEntryIDIncl, Long toIndexEntryIDExcl)
protected List<IndexEntry> getIndexEntries(Class<? extends IndexEntry> indexEntryClass, long fromIndexEntryIDIncl, Long toIndexEntryIDExcl)
protected void createIndex()
protected void createIndexForRange(long fromDataEntryIDIncl, Long toDataEntryIDExcl)
protected List<RecreateIndex.DataEntryWithClassName> getDataEntries(long fromDataEntryIDIncl, Long toDataEntryIDExcl)
protected long getMinDataEntryID()
protected long getMaxDataEntryID()
protected Long getMinMaxDataEntryID(String minMax)
protected Long getMinIndexEntryID()
protected Long getMaxIndexEntryID()
protected Long getMinMaxIndexEntryID(String minMax, Comparator<Long> comparator)
protected Long getMinMaxIndexEntryID(Class<? extends IndexEntry> indexEntryClass, String minMax)
protected Set<Class<? extends IndexEntry>> getIndexEntryClasses()
|
Cumulus4j API (1.1.1) |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |