示例#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);
 }