@@ -0,0 +1,2147 @@
+package com.github.lucene.store.database;%0D%0A%0D%0Aimport java.io.IOException;%0D%0A%0D%0Aimport org.apache.lucene.store.Directory;%0D%0Aimport org.apache.lucene.store.Lock;%0D%0Aimport org.apache.lucene.store.LockFactory;%0D%0Aimport org.apache.lucene.store.LockObtainFailedException;%0D%0Aimport org.slf4j.Logger;%0D%0Aimport org.slf4j.LoggerFactory;%0D%0A%0D%0Apublic class DatabaseSelectForUpdateLockFactory extends LockFactory %7B%0D%0A%0D%0A    private static final Logger LOGGER = LoggerFactory.getLogger(DatabasePhantomReadLockFactory.class);%0D%0A    private static final DatabaseDirectoryHandler handler = DatabaseDirectoryHandler.INSTANCE;%0D%0A%0D%0A    public static final LockFactory INSTANCE = new DatabaseSelectForUpdateLockFactory();%0D%0A%0D%0A    private DatabaseSelectForUpdateLockFactory() %7B%0D%0A    %7D%0D%0A%0D%0A    @Override%0D%0A    public Lock obtainLock(final Directory dir, final String lockName) throws IOException %7B%0D%0A        LOGGER.info(%22%7B%7D.obtainLock(%7B%7D, %7B%7D)%22, this, dir, lockName);%0D%0A%0D%0A        final DatabaseDirectory directory = (DatabaseDirectory) dir;%0D%0A        try %7B%0D%0A            // TODO Auto-generated method stub%0D%0A            // handler.saveFile(directory, lockName, null, 0);%0D%0A            return new DatabaseSelectForUpdateLock(directory, lockName);%0D%0A        %7D catch (final DatabaseDirectoryException e) %7B%0D%0A            throw new LockObtainFailedException(%22Lock instance already obtained: %22 + directory);%0D%0A        %7D%0D%0A    %7D%0D%0A%0D%0A    @Override%0D%0A    public String toString() %7B%0D%0A        return this.getClass().getSimpleName();%0D%0A    %7D%0D%0A%0D%0A    static final class DatabaseSelectForUpdateLock extends Lock %7B%0D%0A%0D%0A        private final DatabaseDirectory directory;%0D%0A        private final String name;%0D%0A        private volatile boolean closed;%0D%0A%0D%0A        public DatabaseSelectForUpdateLock(final DatabaseDirectory directory, final String name) %7B%0D%0A            this.directory = directory;%0D%0A            this.name = name;%0D%0A        %7D%0D%0A%0D%0A        @Override%0D%0A        public void close() throws IOException %7B%0D%0A            // TODO Auto-generated method stub%0D%0A%0D%0A        %7D%0D%0A%0D%0A        @Override%0D%0A        public void ensureValid() throws IOException %7B%0D%0A            // TODO Auto-generated method stub%0D%0A%0D%0A        %7D%0D%0A%0D%0A    %7D%0D%0A%0D%0A%7D%0D%0A

add new LockFactory, DatabaseSelectForUpdatLockFactory