mirror of
https://github.com/proxiodev/RedisBungee.git
synced 2024-11-23 04:28:01 +00:00
invalidate clarifcation, remove unified jedis method from ProxyDataManager
This commit is contained in:
parent
17f67d6c32
commit
e42fcc0d2f
@ -49,7 +49,7 @@ public abstract class PlayerDataManager<P, LE, DE, PS extends IPubSubMessageEven
|
|||||||
|
|
||||||
public PlayerDataManager(RedisBungeePlugin<P> plugin) {
|
public PlayerDataManager(RedisBungeePlugin<P> plugin) {
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
this.unifiedJedis = plugin.proxyDataManager().unifiedJedis();
|
this.unifiedJedis = plugin.getSummoner().obtainResource();
|
||||||
this.proxyId = plugin.proxyDataManager().proxyId();
|
this.proxyId = plugin.proxyDataManager().proxyId();
|
||||||
this.networkId = plugin.proxyDataManager().networkId();
|
this.networkId = plugin.proxyDataManager().networkId();
|
||||||
}
|
}
|
||||||
@ -80,6 +80,8 @@ public abstract class PlayerDataManager<P, LE, DE, PS extends IPubSubMessageEven
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void handleNetworkPlayerQuit(IPlayerLeftNetworkEvent event) {
|
protected void handleNetworkPlayerQuit(IPlayerLeftNetworkEvent event) {
|
||||||
|
// reason we don't set the data here because in-case of failure in redis etc,
|
||||||
|
// events won't reach the proxy so data would be incorrect.
|
||||||
this.proxyCache.invalidate(event.getUuid());
|
this.proxyCache.invalidate(event.getUuid());
|
||||||
this.serverCache.invalidate(event.getUuid());
|
this.serverCache.invalidate(event.getUuid());
|
||||||
this.ipCache.invalidate(event.getUuid());
|
this.ipCache.invalidate(event.getUuid());
|
||||||
@ -90,6 +92,8 @@ public abstract class PlayerDataManager<P, LE, DE, PS extends IPubSubMessageEven
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void handleNetworkPlayerJoin(IPlayerJoinedNetworkEvent event) {
|
protected void handleNetworkPlayerJoin(IPlayerJoinedNetworkEvent event) {
|
||||||
|
// reason we don't set the data here because in-case of failure in redis etc,
|
||||||
|
// events won't reach the proxy so data would be incorrect.
|
||||||
this.proxyCache.invalidate(event.getUuid());
|
this.proxyCache.invalidate(event.getUuid());
|
||||||
this.serverCache.invalidate(event.getUuid());
|
this.serverCache.invalidate(event.getUuid());
|
||||||
this.ipCache.invalidate(event.getUuid());
|
this.ipCache.invalidate(event.getUuid());
|
||||||
|
@ -399,10 +399,6 @@ public abstract class ProxyDataManager implements Runnable {
|
|||||||
return proxyId;
|
return proxyId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public UnifiedJedis unifiedJedis() {
|
|
||||||
return unifiedJedis;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String networkId() {
|
public String networkId() {
|
||||||
return networkId;
|
return networkId;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user