// Path: src/main/java/uk/ac/ic/wlgitbridge/snapshot/push/exception/PostbackTimeoutException.java
// public class PostbackTimeoutException extends SevereSnapshotPostException {
// 
//     @Override
//     public String getMessage() {
//         return "timeout (60s)";
//     }
// 
//     @Override
//     public List<String> getDescriptionLines() {
//         return Arrays.asList(
//                 "The "
//                         + Util.getServiceName()
//                         + " server is currently unavailable.",
//                 "Please try again later."
//         );
//     }
// 
//     @Override
//     public void fromJSON(JsonElement json) {}
// 
// }
// 
// Path: src/main/java/uk/ac/ic/wlgitbridge/snapshot/push/exception/InvalidPostbackKeyException.java
// public class InvalidPostbackKeyException extends Exception {}


import uk.ac.ic.wlgitbridge.snapshot.push.exception.InternalErrorException;
import uk.ac.ic.wlgitbridge.snapshot.push.exception.PostbackTimeoutException;
import uk.ac.ic.wlgitbridge.snapshot.push.exception.SnapshotPostException;
import uk.ac.ic.wlgitbridge.snapshot.push.exception.InvalidPostbackKeyException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.ReentrantLock;
        lock.lock();
        try {
            if (postbackKey.equals(this.postbackKey)) {
                this.versionID = versionID;
                received = true;
                cond.signalAll();
            }
        } finally {
            lock.unlock();
        }
    }

    public void receivedException(
            SnapshotPostException exception,
            String postbackKey
    ) {
        lock.lock();
        try {
            if (postbackKey.equals(this.postbackKey)) {
                this.exception = exception;
                received = true;
                cond.signalAll();
            }
        } finally {
            lock.unlock();
        }
    }

    public void checkPostbackKey(
            String postbackKey
// Path: src/main/java/uk/ac/ic/wlgitbridge/snapshot/push/exception/PostbackTimeoutException.java
// public class PostbackTimeoutException extends SevereSnapshotPostException {
// 
//     @Override
//     public String getMessage() {
//         return "timeout (60s)";
//     }
// 
//     @Override
//     public List<String> getDescriptionLines() {
//         return Arrays.asList(
//                 "The "
//                         + Util.getServiceName()
//                         + " server is currently unavailable.",
//                 "Please try again later."
//         );
//     }
// 
//     @Override
//     public void fromJSON(JsonElement json) {}
// 
// }
// 
// Path: src/main/java/uk/ac/ic/wlgitbridge/snapshot/push/exception/InvalidPostbackKeyException.java
// public class InvalidPostbackKeyException extends Exception {}


// Path: src/main/java/uk/ac/ic/wlgitbridge/snapshot/push/PostbackPromise.java
import uk.ac.ic.wlgitbridge.snapshot.push.exception.InternalErrorException;
import uk.ac.ic.wlgitbridge.snapshot.push.exception.PostbackTimeoutException;
import uk.ac.ic.wlgitbridge.snapshot.push.exception.SnapshotPostException;
import uk.ac.ic.wlgitbridge.snapshot.push.exception.InvalidPostbackKeyException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.ReentrantLock;

        lock.lock();
        try {
            if (postbackKey.equals(this.postbackKey)) {
                this.versionID = versionID;
                received = true;
                cond.signalAll();
            }
        } finally {
            lock.unlock();
        }
    }

    public void receivedException(
            SnapshotPostException exception,
            String postbackKey
    ) {
        lock.lock();
        try {
            if (postbackKey.equals(this.postbackKey)) {
                this.exception = exception;
                received = true;
                cond.signalAll();
            }
        } finally {
            lock.unlock();
        }
    }

    public void checkPostbackKey(
            String postbackKey
    ) throws InvalidPostbackKeyException {