mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
use concurrent hashmap for thread processor cache
This commit is contained in:
parent
9f232a9690
commit
fc606ff5ff
@ -12,9 +12,9 @@ import com.sk89q.worldedit.extent.Extent;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.Map;
|
||||
import java.util.function.Supplier;
|
||||
@ -22,7 +22,7 @@ import java.util.function.Supplier;
|
||||
public class MultiBatchProcessor implements IBatchProcessor {
|
||||
private IBatchProcessor[] processors;
|
||||
private final LoadingCache<Class<?>, Map<Long, Filter>> classToThreadIdToFilter =
|
||||
FaweCache.IMP.createCache((Supplier<Map<Long, Filter>>) HashMap::new);
|
||||
FaweCache.IMP.createCache((Supplier<Map<Long, Filter>>) ConcurrentHashMap::new);
|
||||
|
||||
public MultiBatchProcessor(IBatchProcessor... processors) {
|
||||
this.processors = processors;
|
||||
|
Loading…
Reference in New Issue
Block a user