Package org.apache.lucene.store.bytebuffer

Examples of org.apache.lucene.store.bytebuffer.ByteBufferDirectory.makeLock()


    @Test public void testSimpleLocking() throws Exception {
        ByteBufferCache cache = new ByteBufferCache(40, 80, true);
        ByteBufferDirectory dir = new ByteBufferDirectory(cache);

        Lock lock = dir.makeLock("testlock");

        assertThat(lock.isLocked(), equalTo(false));
        assertThat(lock.obtain(200), equalTo(true));
        assertThat(lock.isLocked(), equalTo(true));
        try {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.