mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-27 21:29:47 +01:00
Lower buffer time to 1 second. Should resolve any issues with changes being overridden. (related: #32)
This commit is contained in:
parent
6b3aab66bf
commit
55a0de7899
@ -27,7 +27,7 @@ import lombok.NonNull;
|
||||
import me.lucko.luckperms.api.*;
|
||||
import me.lucko.luckperms.api.data.Callback;
|
||||
import me.lucko.luckperms.common.LuckPermsPlugin;
|
||||
import me.lucko.luckperms.common.storage.AbstractFuture;
|
||||
import me.lucko.luckperms.common.utils.AbstractFuture;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
@ -30,6 +30,7 @@ import me.lucko.luckperms.common.groups.Group;
|
||||
import me.lucko.luckperms.common.storage.backing.AbstractBacking;
|
||||
import me.lucko.luckperms.common.tracks.Track;
|
||||
import me.lucko.luckperms.common.users.User;
|
||||
import me.lucko.luckperms.common.utils.AbstractFuture;
|
||||
import me.lucko.luckperms.common.utils.LPFuture;
|
||||
|
||||
import java.util.Set;
|
||||
|
@ -31,6 +31,7 @@ import me.lucko.luckperms.common.data.Log;
|
||||
import me.lucko.luckperms.common.groups.Group;
|
||||
import me.lucko.luckperms.common.tracks.Track;
|
||||
import me.lucko.luckperms.common.users.User;
|
||||
import me.lucko.luckperms.common.utils.AbstractFuture;
|
||||
import me.lucko.luckperms.common.utils.LPFuture;
|
||||
|
||||
import java.util.Map;
|
||||
|
@ -84,7 +84,7 @@ public class StorageFactory {
|
||||
private static Datastore fromString(String storageMethod, LuckPermsPlugin plugin) {
|
||||
switch (storageMethod) {
|
||||
case "mysql":
|
||||
BufferedOutputDatastore bod = BufferedOutputDatastore.wrap(AbstractDatastore.wrap(new MySQLBacking(plugin, plugin.getConfiguration().getDatabaseValues())), 3000L);
|
||||
BufferedOutputDatastore bod = BufferedOutputDatastore.wrap(AbstractDatastore.wrap(new MySQLBacking(plugin, plugin.getConfiguration().getDatabaseValues())), 1000L);
|
||||
plugin.doAsyncRepeating(bod, 10L);
|
||||
return bod;
|
||||
case "sqlite":
|
||||
|
@ -20,9 +20,7 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package me.lucko.luckperms.common.storage;
|
||||
|
||||
import me.lucko.luckperms.common.utils.LPFuture;
|
||||
package me.lucko.luckperms.common.utils;
|
||||
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.TimeUnit;
|
@ -26,7 +26,6 @@ import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NonNull;
|
||||
import lombok.Setter;
|
||||
import me.lucko.luckperms.common.storage.AbstractFuture;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
@ -38,7 +37,7 @@ import java.util.ListIterator;
|
||||
* @param <R> the type of result produced by the final process
|
||||
*/
|
||||
public abstract class Buffer<T, R> implements Runnable {
|
||||
private static final long DEFAULT_FLUSH_TIME = 5000; // 5 seconds
|
||||
private static final long DEFAULT_FLUSH_TIME = 1000; // 1 second
|
||||
|
||||
private final List<BufferedObject<T, R>> buffer = new LinkedList<>();
|
||||
|
||||
|
@ -24,7 +24,6 @@ package me.lucko.luckperms.common.utils;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import me.lucko.luckperms.common.storage.AbstractFuture;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
Loading…
Reference in New Issue
Block a user