brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hadr...@apache.org
Subject [14/21] incubator-brooklyn git commit: Delete deprecated code from BrooklynMementoPersister
Date Sat, 01 Aug 2015 15:46:07 GMT
Delete deprecated code from BrooklynMementoPersister


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/8d4c82b5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/8d4c82b5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/8d4c82b5

Branch: refs/heads/master
Commit: 8d4c82b5c426e7ae5bdeaf0d185caf3538e460a7
Parents: 2184e35
Author: Aled Sage <aled.sage@gmail.com>
Authored: Wed Jul 29 17:01:14 2015 +0100
Committer: Aled Sage <aled.sage@gmail.com>
Committed: Sat Aug 1 00:16:50 2015 +0100

----------------------------------------------------------------------
 .../mementos/BrooklynMementoPersister.java      | 16 ---------
 .../BrooklynMementoPersisterToObjectStore.java  | 34 --------------------
 2 files changed, 50 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/8d4c82b5/api/src/main/java/brooklyn/mementos/BrooklynMementoPersister.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/brooklyn/mementos/BrooklynMementoPersister.java b/api/src/main/java/brooklyn/mementos/BrooklynMementoPersister.java
index ec16e9b..f952670 100644
--- a/api/src/main/java/brooklyn/mementos/BrooklynMementoPersister.java
+++ b/api/src/main/java/brooklyn/mementos/BrooklynMementoPersister.java
@@ -21,7 +21,6 @@ package brooklyn.mementos;
 import java.io.IOException;
 import java.util.Collection;
 import java.util.Set;
-import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 
 import javax.annotation.Nullable;
@@ -73,9 +72,6 @@ public interface BrooklynMementoPersister {
      */
     BrooklynMementoRawData loadMementoRawData(RebindExceptionHandler exceptionHandler);
 
-    /** @deprecated since 0.7.0 use {@link #loadMementoManifest(BrooklynMementoRawData, RebindExceptionHandler)}
*/
-    BrooklynMementoManifest loadMementoManifest(RebindExceptionHandler exceptionHandler)
throws IOException;
-    
     /**
      * Loads minimal manifest information (almost entirely *not* deserialized).
      * Implementations should load the raw data if {@link BrooklynMementoRawData} is not
supplied,
@@ -83,8 +79,6 @@ public interface BrooklynMementoPersister {
      */
     BrooklynMementoManifest loadMementoManifest(@Nullable BrooklynMementoRawData mementoData,
RebindExceptionHandler exceptionHandler) throws IOException;
 
-    /** @deprecated since 0.7.0 use {@link #loadMemento(RebindExceptionHandler)} */
-    BrooklynMemento loadMemento(LookupContext lookupContext, RebindExceptionHandler exceptionHandler)
throws IOException;
      /**
       * Retrieves the memento class, containing deserialized objects (but not the {@link
BrooklynObject} class).
       * Implementations should load the raw data if {@link BrooklynMementoRawData} is not
supplied,
@@ -94,10 +88,6 @@ public interface BrooklynMementoPersister {
       */
     BrooklynMemento loadMemento(@Nullable BrooklynMementoRawData mementoData, LookupContext
lookupContext, RebindExceptionHandler exceptionHandler) throws IOException;
 
-    /** @deprecated since 0.7.0, use {@link #checkpoint(BrooklynMementoRawData, PersistenceExceptionHandler)}

-     * and javadoc on implementations of that */ @Deprecated  // pretty sure this is not
used outwith deprecated code
-    void checkpoint(BrooklynMemento memento, PersistenceExceptionHandler exceptionHandler);
-
     /** applies a full checkpoint (write) of all state */  
     void checkpoint(BrooklynMementoRawData newMemento, PersistenceExceptionHandler exceptionHandler);
     /** applies a partial write of state delta */  
@@ -114,12 +104,6 @@ public interface BrooklynMementoPersister {
     @VisibleForTesting
     void waitForWritesCompleted(Duration timeout) throws InterruptedException, TimeoutException;
 
-    /**
-     * @deprecated since 0.7.0; use {@link #waitForWritesCompleted(Duration)}
-     */
-    @VisibleForTesting
-    void waitForWritesCompleted(long timeout, TimeUnit unit) throws InterruptedException,
TimeoutException;
-
     String getBackingStoreDescription();
     
     /** All methods on this interface are unmodifiable by the caller. Sub-interfaces may
introduce modifiers. */

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/8d4c82b5/core/src/main/java/brooklyn/entity/rebind/persister/BrooklynMementoPersisterToObjectStore.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/brooklyn/entity/rebind/persister/BrooklynMementoPersisterToObjectStore.java
b/core/src/main/java/brooklyn/entity/rebind/persister/BrooklynMementoPersisterToObjectStore.java
index 6e3c24d..7c0cc3c 100644
--- a/core/src/main/java/brooklyn/entity/rebind/persister/BrooklynMementoPersisterToObjectStore.java
+++ b/core/src/main/java/brooklyn/entity/rebind/persister/BrooklynMementoPersisterToObjectStore.java
@@ -322,11 +322,6 @@ public class BrooklynMementoPersisterToObjectStore implements BrooklynMementoPer
     }
 
     @Override
-    public BrooklynMementoManifest loadMementoManifest(final RebindExceptionHandler exceptionHandler)
throws IOException {
-        return loadMementoManifest(null, exceptionHandler);
-    }
-    
-    @Override
     public BrooklynMementoManifest loadMementoManifest(BrooklynMementoRawData mementoData,
final RebindExceptionHandler exceptionHandler) throws IOException {
         if (mementoData==null)
             mementoData = loadMementoRawData(exceptionHandler);
@@ -391,11 +386,6 @@ public class BrooklynMementoPersisterToObjectStore implements BrooklynMementoPer
 
         return result;
     }
-
-    @Override
-    public BrooklynMemento loadMemento(LookupContext lookupContext, final RebindExceptionHandler
exceptionHandler) throws IOException {
-        return loadMemento(null, lookupContext, exceptionHandler);
-    }
     
     @Override
     public BrooklynMemento loadMemento(BrooklynMementoRawData mementoData, final LookupContext
lookupContext, final RebindExceptionHandler exceptionHandler) throws IOException {
@@ -547,24 +537,6 @@ public class BrooklynMementoPersisterToObjectStore implements BrooklynMementoPer
         }
     }
 
-
-    @Override
-    public void checkpoint(BrooklynMemento newMemento, PersistenceExceptionHandler exceptionHandler)
{
-        checkWritesAllowed();
-
-        MutableDelta delta = new PersisterDeltaImpl();
-        delta.addAll(BrooklynObjectType.ENTITY, newMemento.getEntityMementos().values());
-        delta.addAll(BrooklynObjectType.LOCATION, newMemento.getLocationMementos().values());
-        delta.addAll(BrooklynObjectType.POLICY, newMemento.getPolicyMementos().values());
-        delta.addAll(BrooklynObjectType.ENRICHER, newMemento.getEnricherMementos().values());
-        delta.addAll(BrooklynObjectType.FEED, newMemento.getFeedMementos().values());
-        delta.addAll(BrooklynObjectType.CATALOG_ITEM, newMemento.getCatalogItemMementos().values());
-        
-        Stopwatch stopwatch = deltaImpl(delta, exceptionHandler);
-        
-        if (LOG.isDebugEnabled()) LOG.debug("Checkpointed entire memento in {}", Time.makeTimeStringRounded(stopwatch));
-    }
-
     @Override
     public void delta(Delta delta, PersistenceExceptionHandler exceptionHandler) {
         checkWritesAllowed();
@@ -639,12 +611,6 @@ public class BrooklynMementoPersisterToObjectStore implements BrooklynMementoPer
     }
 
     @Override
-    @VisibleForTesting
-    public void waitForWritesCompleted(long timeout, TimeUnit unit) throws InterruptedException,
TimeoutException {
-        waitForWritesCompleted(Duration.of(timeout, unit));
-    }
-    
-    @Override
     public void waitForWritesCompleted(Duration timeout) throws InterruptedException, TimeoutException
{
         boolean locked = lock.readLock().tryLock(timeout.toMillisecondsRoundingUp(), TimeUnit.MILLISECONDS);
         if (locked) {


Mime
View raw message