/** * The full text index is currently located in the same namespace as the * lexicon relation. However, the distributed zookeeper locks (ZLocks) * are not reentrant. Therefore this method is overridden to NOT acquire * the ZLock for the namespace of the relation when destroying the full * text index -- that lock is already held for the same namespace by the * {@link LexiconRelation}. */ @Override public void destroy() { if (log.isInfoEnabled()) log.info(""); assertWritable(); final String name = getNamespace() + "." + NAME_SEARCH; getIndexManager().dropIndex(name); }
/** * The full text index is currently located in the same namespace as the * lexicon relation. However, the distributed zookeeper locks (ZLocks) * are not reentrant. Therefore this method is overridden to NOT acquire * the ZLock for the namespace of the relation when destroying the full * text index -- that lock is already held for the same namespace by the * {@link LexiconRelation}. */ @Override public void destroy() { if (log.isInfoEnabled()) log.info(""); assertWritable(); final String name = getNamespace() + "." + NAME_SEARCH; getIndexManager().dropIndex(name); }
final synchronized public LexiconRelation getLexiconRelation() { if (lexiconRelation == null) { long t = getTimestamp(); if (TimestampUtility.isReadWriteTx(t)) { /* * A read-write tx must use the unisolated view of the lexicon. */ t = ITx.UNISOLATED; } // lexicon namespace, since this index is inside the lexicon final String ns = getNamespace(); if (log.isDebugEnabled()) log.debug(ns); lexiconRelation = (LexiconRelation) getIndexManager() .getResourceLocator().locate(ns, t); } return lexiconRelation; } private LexiconRelation lexiconRelation;
final synchronized public LexiconRelation getLexiconRelation() { if (lexiconRelation == null) { long t = getTimestamp(); if (TimestampUtility.isReadWriteTx(t)) { /* * A read-write tx must use the unisolated view of the lexicon. */ t = ITx.UNISOLATED; } // lexicon namespace, since this index is inside the lexicon final String ns = getNamespace(); if (log.isDebugEnabled()) log.debug(ns); lexiconRelation = (LexiconRelation) getIndexManager() .getResourceLocator().locate(ns, t); } return lexiconRelation; } private LexiconRelation lexiconRelation;
final String name = getNamespace() + "." + NAME_SEARCH;
final String name = getNamespace() + "." + NAME_SEARCH;