Cache clear operation on MerchantDAO.
This commit is contained in:
@@ -13,6 +13,11 @@ public class DbMerchantDAO implements MerchantDAO {
|
|||||||
_dbAccess = dbAccess;
|
_dbAccess = dbAccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clearCache() {
|
||||||
|
_transactionsMap.clear();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addTransaction(String blueprintId, float price, Date date, TransactionType transactionType) {
|
public void addTransaction(String blueprintId, float price, Date date, TransactionType transactionType) {
|
||||||
final Transaction lastTransaction = getLastTransaction(blueprintId);
|
final Transaction lastTransaction = getLastTransaction(blueprintId);
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ public interface MerchantDAO {
|
|||||||
|
|
||||||
public void addTransaction(String blueprintId, float price, Date date, TransactionType transactionType);
|
public void addTransaction(String blueprintId, float price, Date date, TransactionType transactionType);
|
||||||
|
|
||||||
|
public void clearCache();
|
||||||
|
|
||||||
public enum TransactionType {
|
public enum TransactionType {
|
||||||
SELL, BUY
|
SELL, BUY
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.gempukku.lotro.server;
|
|||||||
import com.gempukku.lotro.collection.CollectionsManager;
|
import com.gempukku.lotro.collection.CollectionsManager;
|
||||||
import com.gempukku.lotro.db.DeckDAO;
|
import com.gempukku.lotro.db.DeckDAO;
|
||||||
import com.gempukku.lotro.db.LeagueDAO;
|
import com.gempukku.lotro.db.LeagueDAO;
|
||||||
|
import com.gempukku.lotro.db.MerchantDAO;
|
||||||
import com.gempukku.lotro.db.vo.CollectionType;
|
import com.gempukku.lotro.db.vo.CollectionType;
|
||||||
import com.gempukku.lotro.game.*;
|
import com.gempukku.lotro.game.*;
|
||||||
import com.gempukku.lotro.hall.HallServer;
|
import com.gempukku.lotro.hall.HallServer;
|
||||||
@@ -30,6 +31,8 @@ public class AdminResource extends AbstractResource {
|
|||||||
@Context
|
@Context
|
||||||
private LeagueDAO _leagueDao;
|
private LeagueDAO _leagueDao;
|
||||||
@Context
|
@Context
|
||||||
|
private MerchantDAO _merchantDao;
|
||||||
|
@Context
|
||||||
private LotroCardBlueprintLibrary _library;
|
private LotroCardBlueprintLibrary _library;
|
||||||
@Context
|
@Context
|
||||||
private HallServer _hallServer;
|
private HallServer _hallServer;
|
||||||
@@ -45,6 +48,7 @@ public class AdminResource extends AbstractResource {
|
|||||||
_collectionsManager.clearDBCache();
|
_collectionsManager.clearDBCache();
|
||||||
_deckDao.clearCache();
|
_deckDao.clearCache();
|
||||||
_leagueDao.clearCache();
|
_leagueDao.clearCache();
|
||||||
|
_merchantDao.clearCache();
|
||||||
_leagueService.clearCache();
|
_leagueService.clearCache();
|
||||||
|
|
||||||
return "OK";
|
return "OK";
|
||||||
|
|||||||
Reference in New Issue
Block a user