mirror of
https://github.com/proxiodev/RedisBungee.git
synced 2024-11-22 20:28:00 +00:00
more java docs stuff + added jedis pool method and deprecate it
This commit is contained in:
parent
102f8591ab
commit
070e416fac
@ -1,7 +1,7 @@
|
|||||||
package com.imaginarycode.minecraft.redisbungee;
|
package com.imaginarycode.minecraft.redisbungee;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This used to be old plugin instance of redis-bungee but now its used to get the api for old plugins
|
* This used to be old plugin instance of redis-bungee, but now it's used to get the api for old plugins
|
||||||
*
|
*
|
||||||
* @deprecated its deprecated but won't be removed, so please use {@link RedisBungeeAPI#getRedisBungeeApi()}
|
* @deprecated its deprecated but won't be removed, so please use {@link RedisBungeeAPI#getRedisBungeeApi()}
|
||||||
*
|
*
|
||||||
@ -16,7 +16,7 @@ public class RedisBungee {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This returns instance of {@link RedisBungeeAPI}
|
* This returns an instance of {@link RedisBungeeAPI}
|
||||||
*
|
*
|
||||||
* @deprecated Please use {@link RedisBungeeAPI#getRedisBungeeApi()} this class intended to for old plugins that no longer updated.
|
* @deprecated Please use {@link RedisBungeeAPI#getRedisBungeeApi()} this class intended to for old plugins that no longer updated.
|
||||||
*
|
*
|
||||||
|
@ -297,20 +297,33 @@ public class RedisBungeeAPI {
|
|||||||
*
|
*
|
||||||
* @param name the UUID to fetch the name for
|
* @param name the UUID to fetch the name for
|
||||||
* @param expensiveLookups whether or not to perform potentially expensive lookups
|
* @param expensiveLookups whether or not to perform potentially expensive lookups
|
||||||
* @return the UUID for the name
|
* @return the {@link UUID} for the name
|
||||||
* @since 0.3.2
|
* @since 0.3.2
|
||||||
*/
|
*/
|
||||||
public final UUID getUuidFromName(@NonNull String name, boolean expensiveLookups) {
|
public final UUID getUuidFromName(@NonNull String name, boolean expensiveLookups) {
|
||||||
return plugin.getUuidTranslator().getTranslatedUuid(name, expensiveLookups);
|
return plugin.getUuidTranslator().getTranslatedUuid(name, expensiveLookups);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This gives you instance of Jedis!
|
* This gets Redis Bungee {@link JedisPool}
|
||||||
*
|
|
||||||
* @return {@link JedisPool}
|
* @return {@link JedisPool}
|
||||||
|
* @deprecated this secluded to be removed when support for redis sentinel or redis cluster is finished, use {@link RedisBungeeAPI#requestJedis()}
|
||||||
|
* @since 0.6.5
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public JedisPool getJedisPool() {
|
||||||
|
return this.plugin.getJedisPool();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This gives you instance of Jedis
|
||||||
|
* @return {@link Jedis}
|
||||||
* @since 0.7.0
|
* @since 0.7.0
|
||||||
*/
|
*/
|
||||||
public Jedis getJedisPool() {
|
public Jedis requestJedis() {
|
||||||
return this.plugin.requestJedis();
|
return this.plugin.requestJedis();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.imaginarycode.minecraft.redisbungee.internal;
|
package com.imaginarycode.minecraft.redisbungee.internal;
|
||||||
|
|
||||||
import redis.clients.jedis.Jedis;
|
import redis.clients.jedis.Jedis;
|
||||||
|
import redis.clients.jedis.JedisPool;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -16,4 +17,7 @@ public interface JedisSummoner {
|
|||||||
|
|
||||||
boolean isJedisAvailable();
|
boolean isJedisAvailable();
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
|
JedisPool getJedisPool();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -134,6 +134,11 @@ public class RedisBungeeBungeePlugin extends Plugin implements RedisBungeePlugin
|
|||||||
return !jedisPool.isClosed();
|
return !jedisPool.isClosed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JedisPool getJedisPool() {
|
||||||
|
return this.jedisPool;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public RedisBungeeAPI getApi() {
|
public RedisBungeeAPI getApi() {
|
||||||
return this.api;
|
return this.api;
|
||||||
|
Loading…
Reference in New Issue
Block a user