本文整理了Java中org.apache.lucene.store.Lock.ensureValid()
方法的一些代码示例,展示了Lock.ensureValid()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Lock.ensureValid()
方法的具体详情如下:
包路径:org.apache.lucene.store.Lock
类名称:Lock
方法名:ensureValid
[英]Best effort check that this lock is still valid. Locks could become invalidated externally for a number of reasons, for example if a user deletes the lock file manually or when a network filesystem is in use.
[中]尽最大努力检查此锁是否仍然有效。锁可能由于多种原因而在外部失效,例如,如果用户手动删除锁文件或在使用网络文件系统时。
代码示例来源:origin: org.apache.lucene/lucene-core
@Override
public void ensureValid() throws IOException {
lock.ensureValid();
}
代码示例来源:origin: org.apache.lucene/lucene-core
@Override
public IndexOutput createOutput(String name, IOContext context) throws IOException {
writeLock.ensureValid();
return in.createOutput(name, context);
}
代码示例来源:origin: org.apache.lucene/lucene-core
@Override
public void rename(String source, String dest) throws IOException {
writeLock.ensureValid();
in.rename(source, dest);
}
代码示例来源:origin: org.apache.lucene/lucene-core
@Override
public void copyFrom(Directory from, String src, String dest, IOContext context) throws IOException {
writeLock.ensureValid();
in.copyFrom(from, src, dest, context);
}
代码示例来源:origin: org.apache.lucene/lucene-core
@Override
public void close() throws IOException {
try (Lock l = lock) {
l.ensureValid();
verify((byte) 0);
}
}
代码示例来源:origin: org.apache.lucene/lucene-core
@Override
public void deleteFile(String name) throws IOException {
writeLock.ensureValid();
in.deleteFile(name);
}
代码示例来源:origin: org.apache.lucene/lucene-core
@Override
public void sync(Collection<String> names) throws IOException {
writeLock.ensureValid();
in.sync(names);
}
}
代码示例来源:origin: org.apache.lucene/lucene-core
@Override
public void syncMetaData() throws IOException {
writeLock.ensureValid();
in.syncMetaData();
}
代码示例来源:origin: org.elasticsearch/elasticsearch
private void assertEnvIsLocked() {
if (!closed.get() && locks != null) {
for (Lock lock : locks) {
try {
lock.ensureValid();
} catch (IOException e) {
logger.warn("lock assertion failed", e);
throw new IllegalStateException("environment is not locked", e);
}
}
}
}
代码示例来源:origin: org.apache.maven.indexer/indexer-core
@Override
public void ensureValid()
throws IOException
{
delegate.ensureValid();
}
}
代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch
private void assertEnvIsLocked() {
if (!closed.get() && locks != null) {
for (Lock lock : locks) {
try {
lock.ensureValid();
} catch (IOException e) {
logger.warn("lock assertion failed", e);
throw new IllegalStateException("environment is not locked", e);
}
}
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene
@Override
public void deleteFile(String name) throws IOException {
writeLock.ensureValid();
in.deleteFile(name);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene
@Override
public IndexOutput createOutput(String name, IOContext context) throws IOException {
writeLock.ensureValid();
return in.createOutput(name, context);
}
代码示例来源:origin: org.infinispan/infinispan-embedded-query
@Override
public void renameFile(String source, String dest) throws IOException {
writeLock.ensureValid();
in.renameFile(source, dest);
}
代码示例来源:origin: org.infinispan/infinispan-embedded-query
@Override
public void close() throws IOException {
try (Lock l = lock) {
l.ensureValid();
verify((byte) 0);
}
}
代码示例来源:origin: org.infinispan/infinispan-embedded-query
@Override
public void sync(Collection<String> names) throws IOException {
writeLock.ensureValid();
in.sync(names);
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene
@Override
public void sync(Collection<String> names) throws IOException {
writeLock.ensureValid();
in.sync(names);
}
}
代码示例来源:origin: org.infinispan/infinispan-embedded-query
@Override
public IndexOutput createOutput(String name, IOContext context) throws IOException {
writeLock.ensureValid();
return in.createOutput(name, context);
}
代码示例来源:origin: harbby/presto-connectors
@Override
public void copyFrom(Directory from, String src, String dest, IOContext context) throws IOException {
writeLock.ensureValid();
in.copyFrom(from, src, dest, context);
}
代码示例来源:origin: harbby/presto-connectors
@Override
public void renameFile(String source, String dest) throws IOException {
writeLock.ensureValid();
in.renameFile(source, dest);
}
内容来源于网络,如有侵权,请联系作者删除!