Release ObjectStore 0.0.8
This commit is contained in:
1 parent
ed7712a8af
commit
d6427fbac9
61 files changed
+7082
-267
No files matched your search
@@ -3,6 +3,9 @@ package cloud.lunarsky.store;
|
||||
final class StoreException extends RuntimeException {
|
||||
final int status;
|
||||
final String code;
|
||||
final String versionId;
|
||||
final long modified;
|
||||
final boolean deleteMarker;
|
||||
StoreException(int status, String code, String message) {
|
||||
this(status, code, message, null);
|
||||
}
|
||||
@@ -10,5 +13,20 @@ final class StoreException extends RuntimeException {
|
||||
super(message, cause);
|
||||
this.status = status;
|
||||
this.code = code;
|
||||
this.versionId = null;
|
||||
this.modified = -1;
|
||||
this.deleteMarker = false;
|
||||
}
|
||||
private StoreException(int status, String code, String message, String versionId, long modified) {
|
||||
super(message);
|
||||
this.status = status;
|
||||
this.code = code;
|
||||
this.versionId = versionId;
|
||||
this.modified = modified;
|
||||
this.deleteMarker = true;
|
||||
}
|
||||
static StoreException deletedVersion(String versionId, long modified, boolean explicit) {
|
||||
return new StoreException(explicit ? 405 : 404, explicit ? "MethodNotAllowed" : "NoSuchKey",
|
||||
"Object is deleted", versionId, modified);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user