From af417cd58d0d99061ed484e981c7be20adf066d6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 26 Mar 2014 19:38:48 +0100 Subject: [PATCH] Remove Service interface. --- src/main/java/net/pterodactylus/sone/database/Database.java | 7 ++++--- .../net/pterodactylus/sone/database/memory/MemoryDatabase.java | 7 +++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/net/pterodactylus/sone/database/Database.java b/src/main/java/net/pterodactylus/sone/database/Database.java index 02b4ae1..3fd7e2b 100644 --- a/src/main/java/net/pterodactylus/sone/database/Database.java +++ b/src/main/java/net/pterodactylus/sone/database/Database.java @@ -17,8 +17,6 @@ package net.pterodactylus.sone.database; -import com.google.common.util.concurrent.Service; - /** * Database for Sone data. This interface combines the various provider, store, * and builder factory interfaces into a single interface and adds some methods @@ -26,6 +24,9 @@ import com.google.common.util.concurrent.Service; * * @author David ‘Bombe’ Roden */ -public interface Database extends Service, IdentityDatabase, SoneDatabase, PostDatabase, PostReplyDatabase, AlbumDatabase, ImageDatabase { +public interface Database extends IdentityDatabase, SoneDatabase, PostDatabase, PostReplyDatabase, AlbumDatabase, ImageDatabase { + + void start(); + void stop(); } diff --git a/src/main/java/net/pterodactylus/sone/database/memory/MemoryDatabase.java b/src/main/java/net/pterodactylus/sone/database/memory/MemoryDatabase.java index a06fd5f..c49f978 100644 --- a/src/main/java/net/pterodactylus/sone/database/memory/MemoryDatabase.java +++ b/src/main/java/net/pterodactylus/sone/database/memory/MemoryDatabase.java @@ -60,7 +60,6 @@ import com.google.common.collect.ListMultimap; import com.google.common.collect.SetMultimap; import com.google.common.collect.SortedSetMultimap; import com.google.common.collect.TreeMultimap; -import com.google.common.util.concurrent.AbstractService; import com.google.inject.Inject; /** @@ -68,7 +67,7 @@ import com.google.inject.Inject; * * @author David ‘Bombe’ Roden */ -public class MemoryDatabase extends AbstractService implements Database { +public class MemoryDatabase implements Database { private static final Logger logger = getLogger(MemoryDatabase.class.getName()); @@ -132,14 +131,14 @@ public class MemoryDatabase extends AbstractService implements Database { // @Override - protected void doStart() { + public void start() { memoryPostDatabase.start(); loadKnownPostReplies(); notifyStarted(); } @Override - protected void doStop() { + public void stop() { try { memoryPostDatabase.stop(); configuration.save(); -- 2.7.4