Don’t register shutdown hooks for all Services.
[Sone.git] / src / main / java / net / pterodactylus / sone / core / Core.java
index 0f733b6..fbbb166 100644 (file)
@@ -108,7 +108,7 @@ public class Core extends AbstractService {
         * Creates a new core.
         */
        public Core() {
-               super("Sone Core");
+               super("Sone Core", false);
        }
 
        //
@@ -522,6 +522,18 @@ public class Core extends AbstractService {
                return replies;
        }
 
+       /**
+        * Deletes the given reply. It is removed from its Sone and from the reply
+        * cache.
+        *
+        * @param reply
+        *            The reply to remove
+        */
+       public void deleteReply(Reply reply) {
+               reply.getSone().removeReply(reply);
+               replyCache.remove(reply.getId());
+       }
+
        //
        // SERVICE METHODS
        //