mirror of https://github.com/PikaMug/Quests.git
36 lines
1.1 KiB
Java
36 lines
1.1 KiB
Java
/*
|
|
* Copyright (c) PikaMug and contributors
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
|
* LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
*/
|
|
|
|
package me.pikamug.quests.storage.implementation.sql.connection;
|
|
|
|
import me.pikamug.quests.Quests;
|
|
|
|
import java.sql.Connection;
|
|
import java.sql.SQLException;
|
|
import java.util.Collections;
|
|
import java.util.Map;
|
|
import java.util.function.Function;
|
|
|
|
public interface ConnectionFactory {
|
|
String getImplementationName();
|
|
|
|
void init(Quests plugin);
|
|
|
|
void close() throws Exception;
|
|
|
|
default Map<String, String> getMeta() {
|
|
return Collections.emptyMap();
|
|
}
|
|
|
|
Function<String, String> getStatementProcessor();
|
|
|
|
Connection getConnection() throws SQLException;
|
|
}
|