Here are the examples of the java api class org.apache.lucene.store.LockFactory taken from open source projects.
1. FsDirectoryService#newDirectory()
Project: elasticsearch
File: FsDirectoryService.java
File: FsDirectoryService.java
@Override public Directory newDirectory() throws IOException { final Path location = path.resolveIndex(); final LockFactory lockFactory = indexSettings.getValue(INDEX_LOCK_FACTOR_SETTING); Files.createDirectories(location); Directory wrapped = newFSDirectory(location, lockFactory); Set<String> preLoadExtensions = new HashSet<>(indexSettings.getValue(IndexModule.INDEX_STORE_PRE_LOAD_SETTING)); wrapped = setPreload(wrapped, location, lockFactory, preLoadExtensions); if (IndexMetaData.isOnSharedFilesystem(indexSettings.getSettings())) { wrapped = new SleepingLockWrapper(wrapped, 5000); } return new RateLimitedFSDirectory(wrapped, this, this); }