HyCodeYourTale
classpublicPriority 3

IndexedStorageChunkStorageProvider

com.hypixel.hytale.server.core.universe.world.storage.provider.IndexedStorageChunkStorageProvider

implements IChunkStorageProvider

18

Methods

18

Public Methods

0

Fields

1

Constructors

Constants

BuilderCodec<IndexedStorageChunkStorageProvider>CODEC= BuilderCodec.builder( IndexedStorageChunkStorageProvider.class, IndexedStorageChunkStora...
Codec<IndexedStorageChunkStorageProvider.IndexedStorageCache.CacheEntryMetricData>CODEC= BuilderCodec.builder( IndexedStorageChunkStorageProvider.IndexedStorageCache.Cache...
StringID= "IndexedStorage"
MetricsRegistry<IndexedStorageChunkStorageProvider.IndexedStorageCache>METRICS_REGISTRY= new MetricsRegistry<IndexedStorageChunkStorageProvider.IndexedStorageCache>() .register(...

Constructors

public
IndexedStorageChunkStorageProvider()

Methods

Public Methods (18)

public
Resource<ChunkStore> clone()
@Nonnull@Override
public
void close()

throws IOException

@Override
public
void flush()

throws IOException

public
Long2ObjectConcurrentHashMap<IndexedStorageFile> getCache()
@Nonnull
public
SystemGroup<ChunkStore> getGroup()
@Nullable@Override
public
LongSet getIndexes()

throws IOException

@Nonnull
public
IChunkLoader getLoader(Store<ChunkStore> store)
@Nonnull@Override
public
IndexedStorageFile getOrCreate(int regionX, int regionZ)
@Nonnull
public
IndexedStorageFile getOrTryOpen(int regionX, int regionZ)
@Nullable
publicstatic
ResourceType<ChunkStore, IndexedStorageChunkStorageProvider.IndexedStorageCache> getResourceType()
public
IChunkSaver getSaver(Store<ChunkStore> store)
@Nonnull@Override
public
CompletableFuture<ByteBuffer> loadBuffer(int x, int z)
@Nonnull@Override
public
void onSystemAddedToStore(Store<ChunkStore> store)
@Override
public
void onSystemRemovedFromStore(Store<ChunkStore> store)
@Override
public
CompletableFuture<Void> removeBuffer(int x, int z)
@Nonnull@Override
public
CompletableFuture<Void> saveBuffer(int x, int z, ByteBuffer buffer)
@Nonnull@Override
public
MetricResults toMetricResults()
@Nonnull@Override
public
String toString()
@Nonnull@Override

Inheritance

Parent
Current
Interface
Child

Use mouse wheel to zoom, drag to pan. Click nodes to navigate.

Related Classes

Source Code

package com.hypixel.hytale.server.core.universe.world.storage.provider;

import com.hypixel.fastutil.longs.Long2ObjectConcurrentHashMap;
import com.hypixel.hytale.codec.Codec;
import com.hypixel.hytale.codec.KeyedCodec;
import com.hypixel.hytale.codec.builder.BuilderCodec;
import com.hypixel.hytale.codec.codecs.array.ArrayCodec;
import com.hypixel.hytale.component.Resource;
import com.hypixel.hytale.component.ResourceType;
import com.hypixel.hytale.component.Store;
import com.hypixel.hytale.component.SystemGroup;
import com.hypixel.hytale.component.system.StoreSystem;
import com.hypixel.hytale.math.util.ChunkUtil;
import com.hypixel.hytale.metrics.MetricProvider;
import com.hypixel.hytale.metrics.MetricResults;
import com.hypixel.hytale.metrics.MetricsRegistry;
import com.hypixel.hytale.server.core.universe.Universe;
import com.hypixel.hytale.server.core.universe.world.World;
import com.hypixel.hytale.server.core.universe.world.storage.BufferChunkLoader;
import com.hypixel.hytale.server.core.universe.world.storage.BufferChunkSaver;
import com.hypixel.hytale.server.core.universe.world.storage.ChunkStore;
import com.hypixel.hytale.server.core.universe.world.storage.IChunkLoader;
import com.hypixel.hytale.server.core.universe.world.storage.IChunkSaver;
import com.hypixel.hytale.sneakythrow.SneakyThrow;
import com.hypixel.hytale.storage.IndexedStorageFile;
import it.unimi.dsi.fastutil.ints.IntList;
import it.unimi.dsi.fastutil.ints.IntListIterator;
import it.unimi.dsi.fastutil.longs.LongOpenHashSet;
import it.unimi.dsi.fastutil.longs.LongSet;
import it.unimi.dsi.fastutil.longs.LongSets;
import it.unimi.dsi.fastutil.longs.Long2ObjectMap.Entry;
import java.io.Closeable;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.file.FileAlreadyExistsException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.StandardOpenOption;
import java.util.Iterator;
import java.util.concurrent.CompletableFuture;
import java.util.stream.Stream;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;

public class IndexedStorageChunkStorageProvider implements IChunkStorageProvider {
   public static final String ID = "IndexedStorage";
   @Nonnull
   public static final BuilderCodec<IndexedStorageChunkStorageProvider> CODEC = BuilderCodec.builder(
         IndexedStorageChunkStorageProvider.class, IndexedStorageChunkStorageProvider::new
      )
      .documentation("Uses the indexed storage file format to store chunks.")
      .build();

   public IndexedStorageChunkStorageProvider() {
   }

   @Nonnull
   @Override
   public IChunkLoader getLoader(@Nonnull Store<ChunkStore> store) {
      return new IndexedStorageChunkStorageProvider.IndexedStorageChunkLoader(store);
   }

   @Nonnull
   @Override
   public IChunkSaver getSaver(@Nonnull Store<ChunkStore> store) {
      return new IndexedStorageChunkStorageProvider.IndexedStorageChunkSaver(store);
   }

   @Nonnull
   @Override
   public String toString() {
      return "IndexedStorageChunkStorageProvider{}";
   }

   @Nonnull
   private static String toFileName(int regionX, int regionZ) {
      return regionX + "." + regionZ + ".region.bin";
   }

   private static long fromFileName(@Nonnull String fileName) {
      String[] split = fileName.split("\\.");
      if (split.length != 4) {
         throw new IllegalArgumentException("Unexpected file name format!");
      } else if (!"region".equals(split[2])) {
         throw new IllegalArgumentException("Unexpected file name format!");
      } else if (!"bin".equals(split[3])) {
         throw new IllegalArgumentException("Unexpected file extension!");
      } else {
         int regionX = Integer.parseInt(split[0]);
         int regionZ = Integer.parseInt(split[1]);
         return ChunkUtil.indexChunk(regionX, regionZ);
      }
   }

   public static class IndexedStorageCache implements Closeable, MetricProvider, Resource<ChunkStore> {
      @Nonnull
      public static final MetricsRegistry<IndexedStorageChunkStorageProvider.IndexedStorageCache> METRICS_REGISTRY = new MetricsRegistry<IndexedStorageChunkStorageProvider.IndexedStorageCache>()
         .register(
            "Files",
            cache -> cache.cache
                  .long2ObjectEntrySet()
                  .stream()
                  .map(IndexedStorageChunkStorageProvider.IndexedStorageCache.CacheEntryMetricData::new)
                  .toArray(IndexedStorageChunkStorageProvider.IndexedStorageCache.CacheEntryMetricData[]::new),
            new ArrayCodec<>(
               IndexedStorageChunkStorageProvider.IndexedStorageCache.CacheEntryMetricData.CODEC,
               IndexedStorageChunkStorageProvider.IndexedStorageCache.CacheEntryMetricData[]::new
            )
         );
      private final Long2ObjectConcurrentHashMap<IndexedStorageFile> cache = new Long2ObjectConcurrentHashMap(true, ChunkUtil.NOT_FOUND);
      private Path path;

      public IndexedStorageCache() {
      }

      public static ResourceType<ChunkStore, IndexedStorageChunkStorageProvider.IndexedStorageCache> getResourceType() {
         return Universe.get().getIndexedStorageCacheResourceType();
      }

      @Nonnull
      public Long2ObjectConcurrentHashMap<IndexedStorageFile> getCache() {
         return this.cache;
      }

      @Override
      public void close() throws IOException {
         IOException exception = null;
         Iterator<IndexedStorageFile> iterator = this.cache.values().iterator();

         while (iterator.hasNext()) {
            try {
               iterator.next().close();
               iterator.remove();
            } catch (Exception var4) {
               if (exception == null) {
                  exception = new IOException("Failed to close one or more loaders!");
               }

               exception.addSuppressed(var4);
            }
         }

         if (exception != null) {
            throw exception;
         }
      }

      @Nullable
      public IndexedStorageFile getOrTryOpen(int regionX, int regionZ) {
         return (IndexedStorageFile)this.cache.computeIfAbsent(ChunkUtil.indexChunk(regionX, regionZ), k -> {
            Path regionFile = this.path.resolve(IndexedStorageChunkStorageProvider.toFileName(regionX, regionZ));
            if (!Files.exists(regionFile)) {
               return null;
            } else {
               try {
                  return IndexedStorageFile.open(regionFile, StandardOpenOption.READ, StandardOpenOption.WRITE);
               } catch (FileNotFoundException var7) {
                  return null;
               } catch (IOException var8) {
                  throw SneakyThrow.sneakyThrow(var8);
               }
            }
         });
      }

      @Nonnull
      public IndexedStorageFile getOrCreate(int regionX, int regionZ) {
         return (IndexedStorageFile)this.cache.computeIfAbsent(ChunkUtil.indexChunk(regionX, regionZ), k -> {
            try {
               if (!Files.exists(this.path)) {
                  try {
                     Files.createDirectory(this.path);
                  } catch (FileAlreadyExistsException var6) {
                  }
               }

               Path regionFile = this.path.resolve(IndexedStorageChunkStorageProvider.toFileName(regionX, regionZ));
               return IndexedStorageFile.open(regionFile, StandardOpenOption.CREATE, StandardOpenOption.READ, StandardOpenOption.WRITE);
            } catch (IOException var7) {
               throw SneakyThrow.sneakyThrow(var7);
            }
         });
      }

      @Nonnull
      public LongSet getIndexes() throws IOException {
         if (!Files.exists(this.path)) {
            return LongSets.EMPTY_SET;
         } else {
            LongOpenHashSet chunkIndexes = new LongOpenHashSet();

            try (Stream<Path> stream = Files.list(this.path)) {
               stream.forEach(path -> {
                  if (!Files.isDirectory(path)) {
                     long regionIndex;
                     try {
                        regionIndex = IndexedStorageChunkStorageProvider.fromFileName(path.getFileName().toString());
                     } catch (IllegalArgumentException var15) {
                        return;
                     }

                     int regionX = ChunkUtil.xOfChunkIndex(regionIndex);
                     int regionZ = ChunkUtil.zOfChunkIndex(regionIndex);
                     IndexedStorageFile regionFile = this.getOrTryOpen(regionX, regionZ);
                     if (regionFile != null) {
                        IntList blobIndexes = regionFile.keys();
                        IntListIterator iterator = blobIndexes.iterator();

                        while (iterator.hasNext()) {
                           int blobIndex = iterator.nextInt();
                           int localX = ChunkUtil.xFromColumn(blobIndex);
                           int localZ = ChunkUtil.zFromColumn(blobIndex);
                           int chunkX = regionX << 5 | localX;
                           int chunkZ = regionZ << 5 | localZ;
                           chunkIndexes.add(ChunkUtil.indexChunk(chunkX, chunkZ));
                        }
                     }
                  }
               });
            }

            return chunkIndexes;
         }
      }

      public void flush() throws IOException {
         IOException exception = null;

         for (IndexedStorageFile indexedStorageFile : this.cache.values()) {
            try {
               indexedStorageFile.force(false);
            } catch (Exception var5) {
               if (exception == null) {
                  exception = new IOException("Failed to close one or more loaders!");
               }

               exception.addSuppressed(var5);
            }
         }

         if (exception != null) {
            throw exception;
         }
      }

      @Nonnull
      @Override
      public MetricResults toMetricResults() {
         return METRICS_REGISTRY.toMetricResults(this);
      }

      @Nonnull
      @Override
      public Resource<ChunkStore> clone() {
         return new IndexedStorageChunkStorageProvider.IndexedStorageCache();
      }

      private static class CacheEntryMetricData {
         @Nonnull
         private static final Codec<IndexedStorageChunkStorageProvider.IndexedStorageCache.CacheEntryMetricData> CODEC = BuilderCodec.builder(
               IndexedStorageChunkStorageProvider.IndexedStorageCache.CacheEntryMetricData.class,
               IndexedStorageChunkStorageProvider.IndexedStorageCache.CacheEntryMetricData::new
            )
            .append(new KeyedCodec<>("Key", Codec.LONG), (entry, o) -> entry.key = o, entry -> entry.key)
            .add()
            .append(new KeyedCodec<>("File", IndexedStorageFile.METRICS_REGISTRY), (entry, o) -> entry.value = o, entry -> entry.value)
            .add()
            .build();
         private long key;
         private IndexedStorageFile value;

         public CacheEntryMetricData() {
         }

         public CacheEntryMetricData(@Nonnull Entry<IndexedStorageFile> entry) {
            this.key = entry.getLongKey();
            this.value = (IndexedStorageFile)entry.getValue();
         }
      }
   }

   public static class IndexedStorageCacheSetupSystem extends StoreSystem<ChunkStore> {
      public IndexedStorageCacheSetupSystem() {
      }

      @Nullable
      @Override
      public SystemGroup<ChunkStore> getGroup() {
         return ChunkStore.INIT_GROUP;
      }

      @Override
      public void onSystemAddedToStore(@Nonnull Store<ChunkStore> store) {
         World world = store.getExternalData().getWorld();
         store.getResource(IndexedStorageChunkStorageProvider.IndexedStorageCache.getResourceType()).path = world.getSavePath().resolve("chunks");
      }

      @Override
      public void onSystemRemovedFromStore(@Nonnull Store<ChunkStore> store) {
      }
   }

   public static class IndexedStorageChunkLoader extends BufferChunkLoader implements MetricProvider {
      public IndexedStorageChunkLoader(@Nonnull Store<ChunkStore> store) {
         super(store);
      }

      @Override
      public void close() throws IOException {
         this.getStore().getResource(IndexedStorageChunkStorageProvider.IndexedStorageCache.getResourceType()).close();
      }

      @Nonnull
      @Override
      public CompletableFuture<ByteBuffer> loadBuffer(int x, int z) {
         int regionX = x >> 5;
         int regionZ = z >> 5;
         int localX = x & 31;
         int localZ = z & 31;
         int index = ChunkUtil.indexColumn(localX, localZ);
         IndexedStorageChunkStorageProvider.IndexedStorageCache indexedStorageCache = this.getStore()
            .getResource(IndexedStorageChunkStorageProvider.IndexedStorageCache.getResourceType());
         return CompletableFuture.supplyAsync(SneakyThrow.sneakySupplier(() -> {
            IndexedStorageFile chunks = indexedStorageCache.getOrTryOpen(regionX, regionZ);
            return chunks == null ? null : chunks.readBlob(index);
         }));
      }

      @Nonnull
      @Override
      public LongSet getIndexes() throws IOException {
         return this.getStore().getResource(IndexedStorageChunkStorageProvider.IndexedStorageCache.getResourceType()).getIndexes();
      }

      @Nullable
      @Override
      public MetricResults toMetricResults() {
         return this.getStore().getExternalData().getSaver() instanceof IndexedStorageChunkStorageProvider.IndexedStorageChunkSaver
            ? null
            : this.getStore().getResource(IndexedStorageChunkStorageProvider.IndexedStorageCache.getResourceType()).toMetricResults();
      }
   }

   public static class IndexedStorageChunkSaver extends BufferChunkSaver implements MetricProvider {
      protected IndexedStorageChunkSaver(@Nonnull Store<ChunkStore> store) {
         super(store);
      }

      @Override
      public void close() throws IOException {
         IndexedStorageChunkStorageProvider.IndexedStorageCache indexedStorageCache = this.getStore()
            .getResource(IndexedStorageChunkStorageProvider.IndexedStorageCache.getResourceType());
         indexedStorageCache.close();
      }

      @Nonnull
      @Override
      public CompletableFuture<Void> saveBuffer(int x, int z, @Nonnull ByteBuffer buffer) {
         // $VF: Couldn't be decompiled
         // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!)
         // java.lang.NullPointerException: Cannot read field "parameterTypes" because the return value of "org.jetbrains.java.decompiler.struct.StructMethod.getSignature()" is null
         //   at org.jetbrains.java.decompiler.modules.decompiler.exps.InvocationExprent.getInferredExprType(InvocationExprent.java:472)
         //   at org.jetbrains.java.decompiler.modules.decompiler.ExprProcessor.getCastedExprent(ExprProcessor.java:966)
         //   at org.jetbrains.java.decompiler.modules.decompiler.exps.InvocationExprent.appendParamList(InvocationExprent.java:1153)
         //   at org.jetbrains.java.decompiler.modules.decompiler.exps.InvocationExprent.toJava(InvocationExprent.java:902)
         //   at org.jetbrains.java.decompiler.modules.decompiler.ExprProcessor.getCastedExprent(ExprProcessor.java:1018)
         //   at org.jetbrains.java.decompiler.modules.decompiler.exps.ExitExprent.toJava(ExitExprent.java:86)
         //   at org.jetbrains.java.decompiler.modules.decompiler.ExprProcessor.listToJava(ExprProcessor.java:895)
         //   at org.jetbrains.java.decompiler.modules.decompiler.stats.BasicBlockStatement.toJava(BasicBlockStatement.java:90)
         //   at org.jetbrains.java.decompiler.modules.decompiler.stats.RootStatement.toJava(RootStatement.java:36)
         //   at org.jetbrains.java.decompiler.main.ClassWriter.writeMethod(ClassWriter.java:1283)
         //
         // Bytecode:
         // 00: iload 1
         // 01: bipush 5
         // 02: ishr
         // 03: istore 4
         // 05: iload 2
         // 06: bipush 5
         // 07: ishr
         // 08: istore 5
         // 0a: iload 1
         // 0b: bipush 31
         // 0d: iand
         // 0e: istore 6
         // 10: iload 2
         // 11: bipush 31
         // 13: iand
         // 14: istore 7
         // 16: iload 6
         // 18: iload 7
         // 1a: invokestatic com/hypixel/hytale/math/util/ChunkUtil.indexColumn (II)I
         // 1d: istore 8
         // 1f: aload 0
         // 20: invokevirtual com/hypixel/hytale/server/core/universe/world/storage/provider/IndexedStorageChunkStorageProvider$IndexedStorageChunkSaver.getStore ()Lcom/hypixel/hytale/component/Store;
         // 23: invokestatic com/hypixel/hytale/server/core/universe/world/storage/provider/IndexedStorageChunkStorageProvider$IndexedStorageCache.getResourceType ()Lcom/hypixel/hytale/component/ResourceType;
         // 26: invokevirtual com/hypixel/hytale/component/Store.getResource (Lcom/hypixel/hytale/component/ResourceType;)Lcom/hypixel/hytale/component/Resource;
         // 29: checkcast com/hypixel/hytale/server/core/universe/world/storage/provider/IndexedStorageChunkStorageProvider$IndexedStorageCache
         // 2c: astore 9
         // 2e: aload 9
         // 30: iload 4
         // 32: iload 5
         // 34: iload 8
         // 36: aload 3
         // 37: invokedynamic runNow (Lcom/hypixel/hytale/server/core/universe/world/storage/provider/IndexedStorageChunkStorageProvider$IndexedStorageCache;IIILjava/nio/ByteBuffer;)Lcom/hypixel/hytale/sneakythrow/ThrowableRunnable; bsm=java/lang/invoke/LambdaMetafactory.metafactory (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; args=[ ()V, com/hypixel/hytale/server/core/universe/world/storage/provider/IndexedStorageChunkStorageProvider$IndexedStorageChunkSaver.lambda$saveBuffer$0 (Lcom/hypixel/hytale/server/core/universe/world/storage/provider/IndexedStorageChunkStorageProvider$IndexedStorageCache;IIILjava/nio/ByteBuffer;)V, ()V ]
         // 3c: invokestatic com/hypixel/hytale/sneakythrow/SneakyThrow.sneakyRunnable (Lcom/hypixel/hytale/sneakythrow/ThrowableRunnable;)Ljava/lang/Runnable;
         // 3f: invokestatic java/util/concurrent/CompletableFuture.runAsync (Ljava/lang/Runnable;)Ljava/util/concurrent/CompletableFuture;
         // 42: areturn
      }

      @Nonnull
      @Override
      public CompletableFuture<Void> removeBuffer(int x, int z) {
         // $VF: Couldn't be decompiled
         // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!)
         // java.lang.NullPointerException: Cannot read field "parameterTypes" because the return value of "org.jetbrains.java.decompiler.struct.StructMethod.getSignature()" is null
         //   at org.jetbrains.java.decompiler.modules.decompiler.exps.InvocationExprent.getInferredExprType(InvocationExprent.java:472)
         //   at org.jetbrains.java.decompiler.modules.decompiler.ExprProcessor.getCastedExprent(ExprProcessor.java:966)
         //   at org.jetbrains.java.decompiler.modules.decompiler.exps.InvocationExprent.appendParamList(InvocationExprent.java:1153)
         //   at org.jetbrains.java.decompiler.modules.decompiler.exps.InvocationExprent.toJava(InvocationExprent.java:902)
         //   at org.jetbrains.java.decompiler.modules.decompiler.ExprProcessor.getCastedExprent(ExprProcessor.java:1018)
         //   at org.jetbrains.java.decompiler.modules.decompiler.exps.ExitExprent.toJava(ExitExprent.java:86)
         //   at org.jetbrains.java.decompiler.modules.decompiler.ExprProcessor.listToJava(ExprProcessor.java:895)
         //   at org.jetbrains.java.decompiler.modules.decompiler.stats.BasicBlockStatement.toJava(BasicBlockStatement.java:90)
         //   at org.jetbrains.java.decompiler.modules.decompiler.stats.RootStatement.toJava(RootStatement.java:36)
         //   at org.jetbrains.java.decompiler.main.ClassWriter.writeMethod(ClassWriter.java:1283)
         //
         // Bytecode:
         // 00: iload 1
         // 01: bipush 5
         // 02: ishr
         // 03: istore 3
         // 04: iload 2
         // 05: bipush 5
         // 06: ishr
         // 07: istore 4
         // 09: iload 1
         // 0a: bipush 31
         // 0c: iand
         // 0d: istore 5
         // 0f: iload 2
         // 10: bipush 31
         // 12: iand
         // 13: istore 6
         // 15: iload 5
         // 17: iload 6
         // 19: invokestatic com/hypixel/hytale/math/util/ChunkUtil.indexColumn (II)I
         // 1c: istore 7
         // 1e: aload 0
         // 1f: invokevirtual com/hypixel/hytale/server/core/universe/world/storage/provider/IndexedStorageChunkStorageProvider$IndexedStorageChunkSaver.getStore ()Lcom/hypixel/hytale/component/Store;
         // 22: invokestatic com/hypixel/hytale/server/core/universe/world/storage/provider/IndexedStorageChunkStorageProvider$IndexedStorageCache.getResourceType ()Lcom/hypixel/hytale/component/ResourceType;
         // 25: invokevirtual com/hypixel/hytale/component/Store.getResource (Lcom/hypixel/hytale/component/ResourceType;)Lcom/hypixel/hytale/component/Resource;
         // 28: checkcast com/hypixel/hytale/server/core/universe/world/storage/provider/IndexedStorageChunkStorageProvider$IndexedStorageCache
         // 2b: astore 8
         // 2d: aload 8
         // 2f: iload 3
         // 30: iload 4
         // 32: iload 7
         // 34: invokedynamic runNow (Lcom/hypixel/hytale/server/core/universe/world/storage/provider/IndexedStorageChunkStorageProvider$IndexedStorageCache;III)Lcom/hypixel/hytale/sneakythrow/ThrowableRunnable; bsm=java/lang/invoke/LambdaMetafactory.metafactory (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; args=[ ()V, com/hypixel/hytale/server/core/universe/world/storage/provider/IndexedStorageChunkStorageProvider$IndexedStorageChunkSaver.lambda$removeBuffer$0 (Lcom/hypixel/hytale/server/core/universe/world/storage/provider/IndexedStorageChunkStorageProvider$IndexedStorageCache;III)V, ()V ]
         // 39: invokestatic com/hypixel/hytale/sneakythrow/SneakyThrow.sneakyRunnable (Lcom/hypixel/hytale/sneakythrow/ThrowableRunnable;)Ljava/lang/Runnable;
         // 3c: invokestatic java/util/concurrent/CompletableFuture.runAsync (Ljava/lang/Runnable;)Ljava/util/concurrent/CompletableFuture;
         // 3f: areturn
      }

      @Nonnull
      @Override
      public LongSet getIndexes() throws IOException {
         return this.getStore().getResource(IndexedStorageChunkStorageProvider.IndexedStorageCache.getResourceType()).getIndexes();
      }

      @Override
      public void flush() throws IOException {
         this.getStore().getResource(IndexedStorageChunkStorageProvider.IndexedStorageCache.getResourceType()).flush();
      }

      @Override
      public MetricResults toMetricResults() {
         return this.getStore().getResource(IndexedStorageChunkStorageProvider.IndexedStorageCache.getResourceType()).toMetricResults();
      }
   }
}