Example #1
0
 @Override
 public void dispose() {
   try {
     myPersistentEnumerator.close();
   } catch (IOException e) {
     LOG.warn(e);
   }
 }
Example #2
0
 @Nullable
 Hash findHash(@NotNull final Condition<Hash> condition) throws IOException {
   final Ref<Hash> hashRef = Ref.create();
   myPersistentEnumerator.iterateData(
       new CommonProcessors.FindProcessor<Hash>() {
         @Override
         protected boolean accept(Hash hash) {
           boolean matches = condition.value(hash);
           if (matches) {
             hashRef.set(hash);
           }
           return matches;
         }
       });
   return hashRef.get();
 }
Example #3
0
 private int getOrPut(@NotNull Hash hash) throws IOException {
   return myPersistentEnumerator.enumerate(hash);
 }
Example #4
0
 public void flush() {
   myPersistentEnumerator.force();
 }
Example #5
0
 @Nullable
 private Hash doGetHash(int index) throws IOException {
   return myPersistentEnumerator.valueOf(index);
 }