public OIndexAbstract<T> removeCluster(String iClusterName) { acquireExclusiveLock(); try { if (clustersToIndex.remove(iClusterName)) { updateConfiguration(); rebuild(); } return this; } finally { releaseExclusiveLock(); } }
public OIndexAbstract<T> addCluster(final String clusterName) { acquireExclusiveLock(); try { if (clustersToIndex.add(clusterName)) { updateConfiguration(); // INDEX SINGLE CLUSTER indexCluster(clusterName, null, 0, 0, 0); } return this; } finally { releaseExclusiveLock(); } }
public OIndexAbstract(String name, final String type, final String algorithm, final String valueContainerAlgorithm, final ODocument metadata, final int version, final OStorage storage, int binaryFormatVersion) { this.binaryFormatVersion = binaryFormatVersion; acquireExclusiveLock(); try { databaseName = storage.getName(); this.version = version; this.name = name; this.type = type; this.algorithm = algorithm; this.metadata = metadata; this.valueContainerAlgorithm = valueContainerAlgorithm; this.storage = (OAbstractPaginatedStorage) storage.getUnderlying(); } finally { releaseExclusiveLock(); } }
public OIndexInternal<T> delete() { acquireExclusiveLock(); try { while (true) try { storage.deleteIndexEngine(indexId); break; } catch (OInvalidIndexEngineIdException ignore) { doReloadIndexEngine(); } // REMOVE THE INDEX ALSO FROM CLASS MAP if (getDatabase().getMetadata() != null) //noinspection deprecation getDatabase().getMetadata().getIndexManager().removeClassPropertyIndex(this); removeValuesContainer(); return this; } finally { releaseExclusiveLock(); } }
throw OException.wrapException(new OIndexException("Error on rebuilding the index for clusters: " + clustersToIndex), e); } finally { releaseExclusiveLock();