MCPcopy Create free account
hub / github.com/apache/solr / isWriterLocked

Method isWriterLocked

solr/core/src/java/org/apache/solr/core/SolrCore.java:861–869  ·  view source on GitHub ↗

Returns true iff the index in the named directory is currently locked. @param directory the directory to check for a lock @throws IOException if there is a low-level IO error @deprecated Use of this method can only lead to race conditions. Try to actually obtain a lock instead.

(Directory directory)

Source from the content-addressed store, hash-verified

859
860 /**
861 * Returns <code>true</code> iff the index in the named directory is currently locked.
862 *
863 * @param directory the directory to check for a lock
864 * @throws IOException if there is a low-level IO error
865 * @deprecated Use of this method can only lead to race conditions. Try to actually obtain a lock
866 * instead.
867 */
868 @Deprecated(since = "7.0")
869 private static boolean isWriterLocked(Directory directory) throws IOException {
870 try {
871 directory.obtainLock(IndexWriter.WRITE_LOCK_NAME).close();
872 return false;

Callers 1

initIndexMethod · 0.95

Calls 1

closeMethod · 0.65

Tested by

no test coverage detected