All Downloads are FREE. Search and download functionalities are using the official Maven repository.

brooklyn.mementos.BrooklynMementoPersister Maven / Gradle / Ivy

package brooklyn.mementos;

import java.io.IOException;
import java.util.Collection;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;

import brooklyn.entity.rebind.RebindManager;

import com.google.common.annotations.VisibleForTesting;

/**
 * Controls the persisting and reading back of mementos. Used by {@link RebindManager} 
 * to support brooklyn restart.
 */
public interface BrooklynMementoPersister {

    BrooklynMemento loadMemento() throws IOException;
    
    void checkpoint(BrooklynMemento memento);
    
    void delta(Delta delta);

    void stop();

    @VisibleForTesting
    void waitForWritesCompleted(long timeout, TimeUnit unit) throws InterruptedException, TimeoutException;

    public interface Delta {
        Collection locations();
        Collection entities();
        Collection policies();
        Collection removedLocationIds();
        Collection removedEntityIds();
        Collection removedPolicyIds();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy