Remove monitored locks (fair), use basic version

This commit is contained in:
P0nk
2022-08-11 14:45:48 +02:00
parent 54878ebe8c
commit 4fb632ecdb
22 changed files with 50 additions and 175 deletions

View File

@@ -23,8 +23,6 @@ import client.inventory.InventoryType;
import client.inventory.Item;
import client.inventory.ItemFactory;
import constants.game.GameConstants;
import net.server.audit.locks.MonitoredLockType;
import net.server.audit.locks.factory.MonitoredReentrantLockFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import provider.Data;
@@ -42,6 +40,7 @@ import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.*;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
/**
* @author Matze
@@ -57,7 +56,7 @@ public class Storage {
private byte slots;
private final Map<InventoryType, List<Item>> typeItems = new HashMap<>();
private List<Item> items = new LinkedList<>();
private final Lock lock = MonitoredReentrantLockFactory.createLock(MonitoredLockType.STORAGE, true);
private final Lock lock = new ReentrantLock(true);
private Storage(int id, byte slots, int meso) {
this.id = id;