#704 Implement reloading via injector

- Create interfaces Reloadable and SettingsDependent to recognize reloadable classes
- Iterate through instances in injector to reload
This commit is contained in:
ljacqu
2016-05-12 19:51:10 +02:00
parent 4bad04b160
commit e04f7dc711
19 changed files with 240 additions and 50 deletions
@@ -1,6 +1,7 @@
package fr.xephi.authme.datasource;
import fr.xephi.authme.cache.auth.PlayerAuth;
import fr.xephi.authme.initialization.Reloadable;
import fr.xephi.authme.security.crypts.HashedPassword;
import java.util.List;
@@ -8,7 +9,7 @@ import java.util.List;
/**
* Interface for manipulating {@link PlayerAuth} objects from a data source.
*/
public interface DataSource {
public interface DataSource extends Reloadable {
/**
* Return whether there is a record for the given username.
@@ -204,6 +205,7 @@ public interface DataSource {
/**
* Reload the data source.
*/
@Override
void reload();
}