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