@Override public Index createIndex(String indexName, IndexType indexType, String indexedExpression, String fromClause) throws IndexNameConflictException, IndexExistsException, RegionNotFoundException { return createIndex(indexName, indexType, indexedExpression, fromClause, null); }
@Override public Index createHashIndex(String indexName, String indexedExpression, String fromClause, String imports) throws IndexNameConflictException, IndexExistsException, RegionNotFoundException { return createIndex(indexName, IndexType.HASH, indexedExpression, fromClause, imports); }
@Override public Index createIndex(String indexName, String indexedExpression, String fromClause) throws IndexNameConflictException, IndexExistsException, RegionNotFoundException { return createIndex(indexName, IndexType.FUNCTIONAL, indexedExpression, fromClause, null); }
@Override public Index createIndex(String indexName, IndexType indexType, String indexedExpression, String fromClause, String imports) throws IndexNameConflictException, IndexExistsException, RegionNotFoundException { return createIndex(indexName, indexType, indexedExpression, fromClause, imports, true); }
@Override public Index createIndex(String indexName, String indexedExpression, String fromClause, String imports) throws IndexNameConflictException, IndexExistsException, RegionNotFoundException { return createIndex(indexName, IndexType.FUNCTIONAL, indexedExpression, fromClause, imports); }
@Override public Index createKeyIndex(String indexName, String indexedExpression, String fromClause) throws IndexNameConflictException, IndexExistsException, RegionNotFoundException { return createIndex(indexName, IndexType.PRIMARY_KEY, indexedExpression, fromClause, null); }
indexes.add(createIndex(icd.getIndexName(), icd.getIndexType(), icd.getIndexExpression(), icd.getIndexFromClause(), icd.getIndexImportString(), false, region)); } catch (Exception ex) {
qs.createIndex(icd.getIndexName(), icd.getIndexType(), icd.getIndexExpression(), fromClause, icd.getIndexImportString(), !isOverflowToDisk));
public Index createIndex(String indexName, IndexType indexType, String indexedExpression, String fromClause, String imports, boolean loadEntries, Region region) throws IndexNameConflictException, IndexExistsException, RegionNotFoundException { if (pool != null) { throw new UnsupportedOperationException( "Index creation on the server is not supported from the client."); } PartitionedIndex parIndex = null; if (region == null) { region = getRegionFromPath(imports, fromClause); } RegionAttributes ra = region.getAttributes(); // Asif: If the evistion action is Overflow to disk then do not allow index creation // It is Ok to have index creation if it is persist only mode as data will always // exist in memory // if(ra.getEvictionAttributes().getAction().isOverflowToDisk() ) { // throw new // UnsupportedOperationException(String.format("The specified index conditions are not supported // for regions which overflow to disk. The region involved is %s",regionPath)); // } // if its a pr the create index on all of the local buckets. if (!MemoryThresholds.isLowMemoryExceptionDisabled()) { InternalRegion internalRegion = (InternalRegion) region; MemoryThresholdInfo info = internalRegion.getAtomicThresholdInfo(); if (info.isMemoryThresholdReached()) { throw new LowMemoryException(