Skip to content

Commit

Permalink
Renamed databaserewrite package to database
Browse files Browse the repository at this point in the history
  • Loading branch information
IllusionTheDev committed Oct 25, 2023
1 parent e7eaca6 commit c405d18
Show file tree
Hide file tree
Showing 39 changed files with 83 additions and 83 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import me.illusion.skyblockcore.common.command.audience.SkyblockAudience;
import me.illusion.skyblockcore.common.command.manager.SkyblockCommandManager;
import me.illusion.skyblockcore.common.config.SkyblockMessagesFile;
import me.illusion.skyblockcore.common.databaserewrite.registry.SkyblockDatabaseRegistry;
import me.illusion.skyblockcore.common.database.registry.SkyblockDatabaseRegistry;
import me.illusion.skyblockcore.common.event.manager.SkyblockEventManager;
import me.illusion.skyblockcore.common.event.manager.SkyblockEventManagerImpl;
import me.illusion.skyblockcore.common.utilities.file.IOUtils;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.illusion.skyblockcore.common.databaserewrite;
package me.illusion.skyblockcore.common.database;

import com.google.common.collect.Sets;
import java.util.Collection;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.illusion.skyblockcore.common.databaserewrite;
package me.illusion.skyblockcore.common.database;

import java.util.Collection;
import java.util.concurrent.CompletableFuture;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.illusion.skyblockcore.common.databaserewrite;
package me.illusion.skyblockcore.common.database;

public enum SkyblockDatabaseTag {

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package me.illusion.skyblockcore.common.database.cache;

import me.illusion.skyblockcore.common.database.AbstractSkyblockDatabase;
import me.illusion.skyblockcore.common.database.SkyblockDatabaseTag;

public abstract class AbstractCacheDatabase extends AbstractSkyblockDatabase implements SkyblockCache {

protected AbstractCacheDatabase() {
addTag(SkyblockDatabaseTag.CACHE);
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package me.illusion.skyblockcore.common.databaserewrite.cache;
package me.illusion.skyblockcore.common.database.cache;

import java.util.concurrent.CompletableFuture;
import me.illusion.skyblockcore.common.databaserewrite.SkyblockDatabase;
import me.illusion.skyblockcore.common.database.SkyblockDatabase;

public interface SkyblockCache extends SkyblockDatabase {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package me.illusion.skyblockcore.common.databaserewrite.cache.redis;
package me.illusion.skyblockcore.common.database.cache.redis;

import java.util.concurrent.CompletableFuture;
import java.util.function.Consumer;
import java.util.function.Function;
import me.illusion.skyblockcore.common.config.section.ConfigurationSection;
import me.illusion.skyblockcore.common.databaserewrite.SkyblockDatabaseTag;
import me.illusion.skyblockcore.common.databaserewrite.cache.AbstractCacheDatabase;
import me.illusion.skyblockcore.common.database.SkyblockDatabaseTag;
import me.illusion.skyblockcore.common.database.cache.AbstractCacheDatabase;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package me.illusion.skyblockcore.common.database.persistence;

import me.illusion.skyblockcore.common.database.AbstractSkyblockDatabase;
import me.illusion.skyblockcore.common.database.SkyblockDatabaseTag;

public abstract class AbstractPersistenceDatabase extends AbstractSkyblockDatabase {

protected AbstractPersistenceDatabase() {
addTag(SkyblockDatabaseTag.FETCHING);
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.illusion.skyblockcore.common.databaserewrite.persistence.mongo;
package me.illusion.skyblockcore.common.database.persistence.mongo;

import com.mongodb.client.MongoClient;
import com.mongodb.client.MongoClients;
Expand All @@ -8,8 +8,8 @@
import java.util.List;
import java.util.concurrent.CompletableFuture;
import me.illusion.skyblockcore.common.config.section.ConfigurationSection;
import me.illusion.skyblockcore.common.databaserewrite.SkyblockDatabaseTag;
import me.illusion.skyblockcore.common.databaserewrite.persistence.AbstractPersistenceDatabase;
import me.illusion.skyblockcore.common.database.SkyblockDatabaseTag;
import me.illusion.skyblockcore.common.database.persistence.AbstractPersistenceDatabase;
import org.bson.codecs.Codec;
import org.bson.codecs.configuration.CodecRegistries;
import org.bson.codecs.configuration.CodecRegistry;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.illusion.skyblockcore.common.databaserewrite.persistence.mongo;
package me.illusion.skyblockcore.common.database.persistence.mongo;

import java.util.UUID;
import org.bson.BsonBinary;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package me.illusion.skyblockcore.common.databaserewrite.persistence.sql;
package me.illusion.skyblockcore.common.database.persistence.sql;

import java.util.concurrent.CompletableFuture;
import me.illusion.skyblockcore.common.config.section.ConfigurationSection;
import me.illusion.skyblockcore.common.databaserewrite.SkyblockDatabaseTag;
import me.illusion.skyblockcore.common.database.SkyblockDatabaseTag;

public abstract class AbstractRemoteSQLPersistenceDatabase extends AbstractSQLPersistenceDatabase {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.illusion.skyblockcore.common.databaserewrite.persistence.sql;
package me.illusion.skyblockcore.common.database.persistence.sql;

import java.sql.Connection;
import java.sql.PreparedStatement;
Expand All @@ -11,10 +11,10 @@
import java.util.function.Consumer;
import lombok.SneakyThrows;
import me.illusion.skyblockcore.common.config.section.ConfigurationSection;
import me.illusion.skyblockcore.common.databaserewrite.SkyblockDatabaseTag;
import me.illusion.skyblockcore.common.databaserewrite.persistence.AbstractPersistenceDatabase;
import me.illusion.skyblockcore.common.databaserewrite.sql.functional.ResultSetFunction;
import me.illusion.skyblockcore.common.databaserewrite.sql.object.StatementObject;
import me.illusion.skyblockcore.common.database.SkyblockDatabaseTag;
import me.illusion.skyblockcore.common.database.persistence.AbstractPersistenceDatabase;
import me.illusion.skyblockcore.common.database.sql.functional.ResultSetFunction;
import me.illusion.skyblockcore.common.database.sql.object.StatementObject;

public abstract class AbstractSQLPersistenceDatabase extends AbstractPersistenceDatabase {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package me.illusion.skyblockcore.common.databaserewrite.persistence.sql.impl;
package me.illusion.skyblockcore.common.database.persistence.sql.impl;

import java.sql.Connection;
import java.sql.DriverManager;
import java.util.Properties;
import java.util.concurrent.CompletableFuture;
import me.illusion.skyblockcore.common.databaserewrite.persistence.sql.AbstractRemoteSQLPersistenceDatabase;
import me.illusion.skyblockcore.common.database.persistence.sql.AbstractRemoteSQLPersistenceDatabase;

public abstract class MySQLPersistenceDatabase extends AbstractRemoteSQLPersistenceDatabase {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package me.illusion.skyblockcore.common.databaserewrite.persistence.sql.impl;
package me.illusion.skyblockcore.common.database.persistence.sql.impl;

import java.io.File;
import java.sql.Connection;
import java.sql.DriverManager;
import java.util.concurrent.CompletableFuture;
import me.illusion.skyblockcore.common.config.section.ConfigurationSection;
import me.illusion.skyblockcore.common.databaserewrite.persistence.sql.AbstractSQLPersistenceDatabase;
import me.illusion.skyblockcore.common.database.persistence.sql.AbstractSQLPersistenceDatabase;
import me.illusion.skyblockcore.common.platform.SkyblockPlatform;
import me.illusion.skyblockcore.common.utilities.file.IOUtils;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package me.illusion.skyblockcore.common.databaserewrite.registry;
package me.illusion.skyblockcore.common.database.registry;

import me.illusion.skyblockcore.common.databaserewrite.SkyblockDatabase;
import me.illusion.skyblockcore.common.database.SkyblockDatabase;

public class RegisteredDatabase {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.illusion.skyblockcore.common.databaserewrite.registry;
package me.illusion.skyblockcore.common.database.registry;

import java.util.ArrayList;
import java.util.HashSet;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package me.illusion.skyblockcore.common.databaserewrite.registry;
package me.illusion.skyblockcore.common.database.registry;

import java.util.Map;
import me.illusion.skyblockcore.common.config.section.ConfigurationSection;
import me.illusion.skyblockcore.common.databaserewrite.SkyblockDatabase;
import me.illusion.skyblockcore.common.databaserewrite.registry.provider.MappedDatabaseProvider;
import me.illusion.skyblockcore.common.database.SkyblockDatabase;
import me.illusion.skyblockcore.common.database.registry.provider.MappedDatabaseProvider;

public interface SkyblockDatabaseProvider {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.illusion.skyblockcore.common.databaserewrite.registry;
package me.illusion.skyblockcore.common.database.registry;

import com.google.common.collect.Sets;
import java.util.Collection;
Expand All @@ -10,8 +10,8 @@
import java.util.logging.Level;
import me.illusion.skyblockcore.common.config.section.ConfigurationSection;
import me.illusion.skyblockcore.common.config.section.WritableConfigurationSection;
import me.illusion.skyblockcore.common.databaserewrite.SkyblockDatabase;
import me.illusion.skyblockcore.common.databaserewrite.cache.SkyblockCache;
import me.illusion.skyblockcore.common.database.SkyblockDatabase;
import me.illusion.skyblockcore.common.database.cache.SkyblockCache;
import me.illusion.skyblockcore.common.platform.SkyblockPlatform;
import me.illusion.skyblockcore.common.storage.SkyblockStorage;
import me.illusion.skyblockcore.common.storage.cache.redis.MemorySkyblockIslandCache;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package me.illusion.skyblockcore.common.databaserewrite.registry.provider;
package me.illusion.skyblockcore.common.database.registry.provider;

import com.google.common.collect.ImmutableMap;
import java.util.HashMap;
import java.util.Map;
import me.illusion.skyblockcore.common.databaserewrite.SkyblockDatabase;
import me.illusion.skyblockcore.common.databaserewrite.registry.SkyblockDatabaseProvider;
import me.illusion.skyblockcore.common.database.SkyblockDatabase;
import me.illusion.skyblockcore.common.database.registry.SkyblockDatabaseProvider;

public class MappedDatabaseProvider implements SkyblockDatabaseProvider {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.illusion.skyblockcore.common.databaserewrite.sql.functional;
package me.illusion.skyblockcore.common.database.sql.functional;

import java.sql.ResultSet;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.illusion.skyblockcore.common.databaserewrite.sql.functional;
package me.illusion.skyblockcore.common.database.sql.functional;

import java.sql.ResultSet;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.illusion.skyblockcore.common.databaserewrite.sql.object;
package me.illusion.skyblockcore.common.database.sql.object;

import java.sql.PreparedStatement;
import java.sql.SQLException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.illusion.skyblockcore.common.databaserewrite.sql.object;
package me.illusion.skyblockcore.common.database.sql.object;

import java.sql.PreparedStatement;
import java.sql.SQLException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.illusion.skyblockcore.common.databaserewrite.sql.object;
package me.illusion.skyblockcore.common.database.sql.object;

import java.sql.PreparedStatement;
import java.sql.SQLException;
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import me.illusion.skyblockcore.common.command.manager.SkyblockCommandManager;
import me.illusion.skyblockcore.common.config.ConfigurationProvider;
import me.illusion.skyblockcore.common.config.SkyblockMessagesFile;
import me.illusion.skyblockcore.common.databaserewrite.registry.SkyblockDatabaseRegistry;
import me.illusion.skyblockcore.common.database.registry.SkyblockDatabaseRegistry;
import me.illusion.skyblockcore.common.event.manager.SkyblockEventManager;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package me.illusion.skyblockcore.common.storage;

import java.util.concurrent.CompletableFuture;
import me.illusion.skyblockcore.common.databaserewrite.SkyblockDatabase;
import me.illusion.skyblockcore.common.database.SkyblockDatabase;

public interface SkyblockStorage<T extends SkyblockDatabase> extends SkyblockDatabase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
import me.illusion.skyblockcore.common.databaserewrite.cache.SkyblockCache;
import me.illusion.skyblockcore.common.database.cache.SkyblockCache;

public interface SkyblockIslandCache extends SkyblockCache {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ConcurrentHashMap;
import me.illusion.skyblockcore.common.config.section.ConfigurationSection;
import me.illusion.skyblockcore.common.databaserewrite.AbstractSkyblockDatabase;
import me.illusion.skyblockcore.common.databaserewrite.SkyblockDatabaseTag;
import me.illusion.skyblockcore.common.database.AbstractSkyblockDatabase;
import me.illusion.skyblockcore.common.database.SkyblockDatabaseTag;
import me.illusion.skyblockcore.common.storage.cache.SkyblockIslandCache;

public class MemorySkyblockIslandCache extends AbstractSkyblockDatabase implements SkyblockIslandCache {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
import me.illusion.skyblockcore.common.databaserewrite.cache.redis.AbstractRedisCacheDatabase;
import me.illusion.skyblockcore.common.database.cache.redis.AbstractRedisCacheDatabase;
import me.illusion.skyblockcore.common.storage.cache.SkyblockIslandCache;

public class RedisSkyblockIslandCache extends AbstractRedisCacheDatabase implements SkyblockIslandCache {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
import me.illusion.skyblockcore.common.data.IslandData;
import me.illusion.skyblockcore.common.databaserewrite.persistence.mongo.MongoPersistenceDatabase;
import me.illusion.skyblockcore.common.databaserewrite.persistence.mongo.MongoUUIDCodec;
import me.illusion.skyblockcore.common.database.persistence.mongo.MongoPersistenceDatabase;
import me.illusion.skyblockcore.common.database.persistence.mongo.MongoUUIDCodec;
import me.illusion.skyblockcore.common.storage.island.SkyblockIslandStorage;
import me.illusion.skyblockcore.common.storage.island.mongo.codec.MongoIslandDataCodec;
import org.bson.codecs.Codec;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
import me.illusion.skyblockcore.common.data.IslandData;
import me.illusion.skyblockcore.common.databaserewrite.persistence.sql.impl.MySQLPersistenceDatabase;
import me.illusion.skyblockcore.common.databaserewrite.sql.object.StringStatementObject;
import me.illusion.skyblockcore.common.database.persistence.sql.impl.MySQLPersistenceDatabase;
import me.illusion.skyblockcore.common.database.sql.object.StringStatementObject;
import me.illusion.skyblockcore.common.storage.island.SkyblockIslandStorage;

public class MySQLIslandStorage extends MySQLPersistenceDatabase implements SkyblockIslandStorage { // TODO: De-duplicate the SQL storages
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
import me.illusion.skyblockcore.common.data.IslandData;
import me.illusion.skyblockcore.common.databaserewrite.persistence.sql.impl.SQLitePersistenceDatabase;
import me.illusion.skyblockcore.common.databaserewrite.sql.object.StringStatementObject;
import me.illusion.skyblockcore.common.database.persistence.sql.impl.SQLitePersistenceDatabase;
import me.illusion.skyblockcore.common.database.sql.object.StringStatementObject;
import me.illusion.skyblockcore.common.storage.island.SkyblockIslandStorage;

public class SQLiteIslandStorage extends SQLitePersistenceDatabase implements SkyblockIslandStorage {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ConcurrentHashMap;
import me.illusion.skyblockcore.common.databaserewrite.persistence.mongo.MongoPersistenceDatabase;
import me.illusion.skyblockcore.common.databaserewrite.persistence.mongo.MongoUUIDCodec;
import me.illusion.skyblockcore.common.database.persistence.mongo.MongoPersistenceDatabase;
import me.illusion.skyblockcore.common.database.persistence.mongo.MongoUUIDCodec;
import me.illusion.skyblockcore.common.storage.profiles.SkyblockProfileStorage;
import org.bson.codecs.Codec;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ConcurrentHashMap;
import me.illusion.skyblockcore.common.databaserewrite.persistence.sql.impl.MySQLPersistenceDatabase;
import me.illusion.skyblockcore.common.databaserewrite.sql.object.StringStatementObject;
import me.illusion.skyblockcore.common.database.persistence.sql.impl.MySQLPersistenceDatabase;
import me.illusion.skyblockcore.common.database.sql.object.StringStatementObject;
import me.illusion.skyblockcore.common.storage.profiles.SkyblockProfileStorage;

public class MySQLProfileStorage extends MySQLPersistenceDatabase implements SkyblockProfileStorage {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ConcurrentHashMap;
import me.illusion.skyblockcore.common.databaserewrite.persistence.sql.impl.SQLitePersistenceDatabase;
import me.illusion.skyblockcore.common.databaserewrite.sql.object.StringStatementObject;
import me.illusion.skyblockcore.common.database.persistence.sql.impl.SQLitePersistenceDatabase;
import me.illusion.skyblockcore.common.database.sql.object.StringStatementObject;
import me.illusion.skyblockcore.common.storage.profiles.SkyblockProfileStorage;

public class SQLiteProfileStorage extends SQLitePersistenceDatabase implements SkyblockProfileStorage {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import lombok.Getter;
import me.illusion.skyblockcore.common.communication.packet.PacketManager;
import me.illusion.skyblockcore.common.config.SkyblockMessagesFile;
import me.illusion.skyblockcore.common.databaserewrite.SkyblockDatabaseTag;
import me.illusion.skyblockcore.common.database.SkyblockDatabaseTag;
import me.illusion.skyblockcore.common.event.manager.SkyblockEventManager;
import me.illusion.skyblockcore.common.storage.cache.SkyblockIslandCache;
import me.illusion.skyblockcore.common.storage.island.SkyblockIslandStorage;
Expand Down
Loading

0 comments on commit c405d18

Please sign in to comment.