Cleaned up more documentation

This commit is contained in:
Nicholas Rees 2021-05-02 17:42:23 -05:00
parent 931ded5190
commit d2177c02a4
9 changed files with 37 additions and 0 deletions

View File

@ -82,6 +82,7 @@ public class CacheRepository extends RedisRepository<String, ICacheItem<?>> {
/**
* Find a {@link ICacheItem} by the given {@link Class} and identifier
*
* @param clazz the class of the cache item to lookup
* @param identifier the identifier of the cache item
* @return the optional cache item
@ -92,6 +93,7 @@ public class CacheRepository extends RedisRepository<String, ICacheItem<?>> {
/**
* Find a {@link ICacheItem} by the given {@link Class} and test against the {@link Predicate}
*
* @param clazz the class of the cache item to lookup
* @param predicate the predicate to test against
* @return the optional cache item
@ -104,6 +106,7 @@ public class CacheRepository extends RedisRepository<String, ICacheItem<?>> {
/**
* Find a {@link ICacheItem} by the given {@link Class} and identifier and remove it from Redis
*
* @param clazz the class of the cache item to remove
* @param identifier the identifier of the cache item
*/

View File

@ -60,6 +60,7 @@ public class JedisCommandHandler {
/**
* Add a command listener
*
* @param consumer The listener to add
*/
public void addListener(Consumer<JedisCommand> consumer) {
@ -68,6 +69,7 @@ public class JedisCommandHandler {
/**
* Send a {@link JedisCommand} across the network
*
* @param command The command to send
*/
public void send(JedisCommand command) {

View File

@ -23,6 +23,7 @@ public class Node {
/**
* Check whether or not the Node is reachable
*
* @return the reachable state
*/
@SneakyThrows
@ -53,6 +54,7 @@ public class Node {
/**
* Get a list of {@link MinecraftServer}'s running under this node
*
* @return the list of servers
*/
public Collection<MinecraftServer> getServers() {

View File

@ -27,6 +27,7 @@ public class ServerGroup {
/**
* Get a list of {@link MinecraftServer}'s running under this server group
*
* @return the list of servers
*/
public Collection<MinecraftServer> getServers() {

View File

@ -41,6 +41,7 @@ public class MinecraftServer {
/**
* Set the state of the server to the given state
*
* @param state the state
*/
public void setState(ServerState state) {
@ -52,6 +53,7 @@ public class MinecraftServer {
/**
* Return whether or not the Minecraft server is running by checking
* the dead state and the server state
*
* @return the running state
*/
public boolean isRunning() {
@ -63,6 +65,7 @@ public class MinecraftServer {
/**
* Return whether or not the Minecraft server is lagging by
* checking if ths tps is 15 or below
*
* @return the lagging state
*/
public boolean isLagging() {
@ -73,6 +76,7 @@ public class MinecraftServer {
* Return whether or not the Minecraft server is dead.
* A server is considered dead if it hasn't sent a heartbeat
* within 8 seconds and the server is older than 30 seconds
*
* @return the dead state
*/
public boolean isDead() {
@ -83,6 +87,7 @@ public class MinecraftServer {
/**
* Return whether or not the server was created in the last minute
*
* @return the new state
*/
public boolean isNew() {
@ -91,6 +96,7 @@ public class MinecraftServer {
/**
* Get the uptime of the server in millis
*
* @return the uptime
*/
public long getUptime() {

View File

@ -33,6 +33,7 @@ public abstract class RedisRepository<I, T> {
/**
* Lookup a {@link T} object by {@link I}
*
* @param i The object to use to do the lookup
* @return optional {@link T}
*/
@ -40,6 +41,7 @@ public abstract class RedisRepository<I, T> {
/**
* Get the Redis key for the given {@link T} object
*
* @param t The object to get the key for
* @return the key
*/
@ -47,6 +49,7 @@ public abstract class RedisRepository<I, T> {
/**
* Create a new {@link T} instance from the given map
*
* @param map The map
* @return the new instance
*/
@ -54,12 +57,14 @@ public abstract class RedisRepository<I, T> {
/**
* Get how long a key should be stored
*
* @return the expiration time, -1 if none
*/
public abstract long getExpiration(T t);
/**
* Create a new map for the given {@link T} object
*
* @param t The object`
* @return the map
*/
@ -67,6 +72,7 @@ public abstract class RedisRepository<I, T> {
/**
* Get the cached value for the repository
*
* @return the cached values
*/
public List<T> getCached() {
@ -75,6 +81,7 @@ public abstract class RedisRepository<I, T> {
/**
* Lookup a {@link T} object that tests against the {@link Predicate}
*
* @param predicate The predicate to test
* @return optional {@link T}
*/
@ -84,6 +91,7 @@ public abstract class RedisRepository<I, T> {
/**
* Add an update listener
*
* @param consumer the consumer to add
*/
public void addUpdateListener(Consumer<List<T>> consumer) {
@ -92,6 +100,7 @@ public abstract class RedisRepository<I, T> {
/**
* Adds the given {@link T} object to the local cache and to Redis
*
* @param t The object to add
*/
public void post(T t) {
@ -114,6 +123,7 @@ public abstract class RedisRepository<I, T> {
/**
* Remove the given {@link T} object from the local cache and from Redis
*
* @param t The object to remove
*/
public void remove(T t) {
@ -156,6 +166,7 @@ public abstract class RedisRepository<I, T> {
/**
* Get a {@link RedisRepository} from the given {@link Class}
*
* @param clazz The class to get the repository from
* @return the repository
*/

View File

@ -23,6 +23,7 @@ public class Table {
/**
* Create the table in the MySQL database
*
* @param mySQLController the MySQL controller
* @param ignoreExisting whether or not to ignore the existing table
* @throws SQLException exception

View File

@ -21,6 +21,7 @@ public class Column<T> {
/**
* Construct a new column with a name and a value. This is used when executing
* queries in a repository.
*
* @param name the name of the column
* @param value the value in the column
*/

View File

@ -17,6 +17,7 @@ public class MySQLRepository {
/**
* Insert the given columns using the provided query
*
* @param query the query to execute
* @param columns the columns to insert
* @return the amount of rows affected
@ -27,6 +28,7 @@ public class MySQLRepository {
/**
* Insert the given columns using the provided query
*
* @param query the query to execute
* @param columns the columns to insert
* @param onComplete the oncomplete consumer
@ -38,6 +40,7 @@ public class MySQLRepository {
/**
* Insert the given columns using the provided query
*
* @param query the query to execute
* @param columns the columns to insert
* @param onComplete the oncomplete consumer
@ -56,6 +59,7 @@ public class MySQLRepository {
/**
* Insert the given columns using the provided query
*
* @param connection the connection to execute the query on
* @param query the query to execute
* @param columns the columns to insert
@ -67,6 +71,7 @@ public class MySQLRepository {
/**
* Insert the given columns using the provided query
*
* @param connection the connection to execute the query on
* @param query the query to execute
* @param columns the columns to insert
@ -79,6 +84,7 @@ public class MySQLRepository {
/**
* Insert the given columns using the provided query
*
* @param connection the connection to execute the query on
* @param query the query to execute
* @param columns the columns to insert
@ -114,6 +120,7 @@ public class MySQLRepository {
/**
* Execute the given query
*
* @param query the query to execute
* @param columns the columns to use in the query
* @param onComplete the oncomplete consumer
@ -124,6 +131,7 @@ public class MySQLRepository {
/**
* Execute the given query
*
* @param query the query to execute
* @param columns the columns to use in the query
* @param onComplete the oncomplete consumer
@ -140,6 +148,7 @@ public class MySQLRepository {
/**
* Execute the given query
*
* @param connection the connection to execute the query on
* @param query the query to execute
* @param columns the columns to use in the query
@ -151,6 +160,7 @@ public class MySQLRepository {
/**
* Execute the given query
*
* @param connection the connection to execute the query on
* @param query the query to execute
* @param columns the columns to use in the query