| | |
| | | try |
| | | { |
| | | //Try creating all the indexes before confirming they are valid ones. |
| | | new AttributeIndex(cfg, state, env, EntryContainer.this); |
| | | new AttributeIndex(cfg, EntryContainer.this); |
| | | return true; |
| | | } |
| | | catch(Exception e) |
| | |
| | | |
| | | try |
| | | { |
| | | AttributeIndex index = |
| | | new AttributeIndex(cfg, state, env, EntryContainer.this); |
| | | AttributeIndex index = new AttributeIndex(cfg, EntryContainer.this); |
| | | index.open(); |
| | | if(!index.isTrusted()) |
| | | { |
| | |
| | | { |
| | | LocalDBIndexCfg indexCfg = config.getLocalDBIndex(idx); |
| | | |
| | | AttributeIndex index = |
| | | new AttributeIndex(indexCfg, state, env, this); |
| | | AttributeIndex index = new AttributeIndex(indexCfg, this); |
| | | index.open(); |
| | | if(!index.isTrusted()) |
| | | { |
| | |
| | | return index; |
| | | } |
| | | |
| | | /** |
| | | * Creates a new index for an attribute. |
| | | * |
| | | * @param indexName the name to give to the new index |
| | | * @param indexer the indexer to use when inserting data into the index |
| | | * @param indexEntryLimit the index entry limit |
| | | * @return a new index |
| | | */ |
| | | Index newIndexForAttribute(String indexName, Indexer indexer, int indexEntryLimit) |
| | | { |
| | | final int cursorEntryLimit = 100000; |
| | | return new Index(indexName, indexer, state, indexEntryLimit, cursorEntryLimit, false, env, this); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Checks if any modifications apply to this indexed attribute. |