Beispiel #1
0
 @Override
 public void dispose() {
   try {
     myPersistentEnumerator.close();
   } catch (IOException e) {
     LOG.warn(e);
   }
 }
Beispiel #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();
 }
Beispiel #3
0
 private int getOrPut(@NotNull Hash hash) throws IOException {
   return myPersistentEnumerator.enumerate(hash);
 }
Beispiel #4
0
 public void flush() {
   myPersistentEnumerator.force();
 }
Beispiel #5
0
 @Nullable
 private Hash doGetHash(int index) throws IOException {
   return myPersistentEnumerator.valueOf(index);
 }