Example usage for com.amazonaws.services.elasticache.model SnapshotNotFoundException SnapshotNotFoundException

List of usage examples for com.amazonaws.services.elasticache.model SnapshotNotFoundException SnapshotNotFoundException

Introduction

In this page you can find the example usage for com.amazonaws.services.elasticache.model SnapshotNotFoundException SnapshotNotFoundException.

Prototype

public SnapshotNotFoundException(String message) 

Source Link

Document

Constructs a new SnapshotNotFoundException with the specified error message.

Usage

From source file:org.duracloud.snapshot.service.impl.SnapshotJobManagerImpl.java

License:Apache License

private Snapshot getSnapshot(String snapshotId) throws SnapshotNotFoundException {
    Snapshot snapshot = this.snapshotRepo.findByName(snapshotId);
    if (snapshot == null) {
        throw new SnapshotNotFoundException(snapshotId);
    }/*from w ww  . j a  v a2s .c o m*/

    return snapshot;
}