Package org.apache.lucene.store

Examples of org.apache.lucene.store.Directory.fileModified()


         long lastModifiedDate = dir.fileModified(fileName);
         Thread.sleep(100);

         dir.touchFile(fileName);
         AssertJUnit.assertEquals(lastModifiedDate, dir.fileModified(fileName));
      } finally {
         dir.close();
      }
   }
View Full Code Here


         String fileName = "dummyFileName";
         dir = DirectoryBuilder.newDirectoryInstance(cache, cache, cache, "indexName").create();
         createFile(fileName, dir);

         assert dir.fileExists(fileName);
         assert dir.fileModified(fileName) != 0;

         assert dir.fileModified("nonExistentFileName.txt") == 0;
      } finally {
         if (dir != null) dir.close();
      }
View Full Code Here

         createFile(fileName, dir);

         assert dir.fileExists(fileName);
         assert dir.fileModified(fileName) != 0;

         assert dir.fileModified("nonExistentFileName.txt") == 0;
      } finally {
         if (dir != null) dir.close();
      }
   }
View Full Code Here

         String fileName = "testfile.txt";

         dir = DirectoryBuilder.newDirectoryInstance(cache, cache, cache, "indexName").create();
         createFile(fileName, dir);

         long lastModifiedDate = dir.fileModified(fileName);

         Thread.sleep(100);

         dir.touchFile(fileName);
         assert lastModifiedDate != dir.fileModified(fileName);
View Full Code Here

         long lastModifiedDate = dir.fileModified(fileName);

         Thread.sleep(100);

         dir.touchFile(fileName);
         assert lastModifiedDate != dir.fileModified(fileName);
      } finally {
         if (dir != null) dir.close();
      }
   }
View Full Code Here

      try {
         Cache cache = cacheManager.getCache();
         String fileName = "nonExistent.txt";
         dir = DirectoryBuilder.newDirectoryInstance(cache, cache, cache, "indexName").create();

         long lastModifiedDate = dir.fileModified(fileName);
         Thread.sleep(100);

         dir.touchFile(fileName);
         AssertJUnit.assertEquals(lastModifiedDate, dir.fileModified(fileName));
      } finally {
View Full Code Here

         long lastModifiedDate = dir.fileModified(fileName);
         Thread.sleep(100);

         dir.touchFile(fileName);
         AssertJUnit.assertEquals(lastModifiedDate, dir.fileModified(fileName));
      } finally {
         dir.close();
      }
   }
View Full Code Here

         dir = new InfinispanDirectory(cache, "index");
         createFile(fileName, dir);

         assert dir.fileExists(fileName);
         assert dir.fileModified(fileName) != 0;

         assert dir.fileModified("nonExistentFileName.txt") == 0;
      } finally {
         if (dir != null) dir.close();
      }
View Full Code Here

         createFile(fileName, dir);

         assert dir.fileExists(fileName);
         assert dir.fileModified(fileName) != 0;

         assert dir.fileModified("nonExistentFileName.txt") == 0;
      } finally {
         if (dir != null) dir.close();
      }
   }
View Full Code Here

         String fileName = "testfile.txt";

         dir = new InfinispanDirectory(cache, "index");
         createFile(fileName, dir);

         long lastModifiedDate = dir.fileModified(fileName);

         Thread.sleep(100);

         dir.touchFile(fileName);
         assert lastModifiedDate != dir.fileModified(fileName);
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.