Package me.ahoo.cosid.store.remote
Class RemoteApi
java.lang.Object
me.ahoo.cosid.store.remote.RemoteApi
The HTTP API (no version prefix, D30) of
cosid-server (08-remote.md §2): the paths, the error codes of the error body
{code, message} and the field names both sides use. Keys and namespaces travel in request bodies, never in
paths.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringPOST {namespace, ownerKey, incarnation, limit, ttlMs, toleranceMs, slotOffset?, preferredSlot?}→ the lease andreason,duplicateOwnerKey; exhausted: 409.static final String400: a parameter is missing or out of its limits.static final String503: the blocking pool is full; the response carriesRetry-After: 1.static final String403: the token may not use that namespace or key.static final String409: the generator is disabled.static final StringGET ?count=n→{ids: [...]}, from the generator nameddefault;/{generator}names another.static final String409: the owner or fence of the lease no longer match (renew, release).static final String405: the path takes another method.static final String409: the namespace was first used with another limit, tolerance or slot offset.static final String404: no such path or generator.static final String422: the range would passLong.MAX_VALUE.static final String410: the range key is sealed.static final StringPOST {namespace, slot, ownerKey, incarnation, fence, expiresAt?, floor?, ceiling?, storeNow?, lastIssued}→ 204; lost: 409.static final StringPOST {namespace, slot, ownerKey, incarnation, fence, expiresAt?, floor?, ceiling?, storeNow?, ttlMs, toleranceMs}→ the lease; lost: 409.static final StringPOST {key, size, initialOffset}→{start, end}; sealed: 410.static final StringPOST {key}→ 204; 501 when the backing store cannot seal.static final String501: the backing store cannot seal keys.static final String409: every slot below the limit is held; the body also carriesearliestExpiresAt.static final String500: the backing store failed.static final String504: the backing store timed out; the client reports aStoreTimeoutExceptioncause.static final String429: the client already uses as many range keys in the namespace as the server allows.static final String429: the client already uses range keys in as many namespaces as the server allows.static final String401: no token, or an unknown one.static final String501: the backing store lacks the primitive. -
Method Summary
-
Field Details
-
RESERVE
POST {key, size, initialOffset}→{start, end}; sealed: 410.- See Also:
-
SEAL
POST {key}→ 204; 501 when the backing store cannot seal.- See Also:
-
ACQUIRE
POST {namespace, ownerKey, incarnation, limit, ttlMs, toleranceMs, slotOffset?, preferredSlot?}→ the lease andreason,duplicateOwnerKey; exhausted: 409.slotOffset(0 by default) is recorded with the namespace.- See Also:
-
RENEW
POST {namespace, slot, ownerKey, incarnation, fence, expiresAt?, floor?, ceiling?, storeNow?, ttlMs, toleranceMs}→ the lease; lost: 409. The window fields are those of the lease, sent back as they were.- See Also:
-
RELEASE
POST {namespace, slot, ownerKey, incarnation, fence, expiresAt?, floor?, ceiling?, storeNow?, lastIssued}→ 204; lost: 409.- See Also:
-
IDS
GET ?count=n→{ids: [...]}, from the generator nameddefault;/{generator}names another.- See Also:
-
BAD_REQUEST
400: a parameter is missing or out of its limits.- See Also:
-
UNAUTHORIZED
401: no token, or an unknown one.- See Also:
-
FORBIDDEN
403: the token may not use that namespace or key.- See Also:
-
NOT_FOUND
404: no such path or generator.- See Also:
-
METHOD_NOT_ALLOWED
405: the path takes another method.- See Also:
-
SLOTS_EXHAUSTED
409: every slot below the limit is held; the body also carriesearliestExpiresAt.- See Also:
-
LEASE_LOST
409: the owner or fence of the lease no longer match (renew, release).- See Also:
-
NAMESPACE_MISMATCH
409: the namespace was first used with another limit, tolerance or slot offset.- See Also:
-
GENERATOR_DISABLED
409: the generator is disabled.- See Also:
-
RANGE_SEALED
410: the range key is sealed.- See Also:
-
RANGE_EXHAUSTED
422: the range would passLong.MAX_VALUE.- See Also:
-
TOO_MANY_KEYS
429: the client already uses as many range keys in the namespace as the server allows.- See Also:
-
TOO_MANY_NAMESPACES
429: the client already uses range keys in as many namespaces as the server allows.- See Also:
-
STORE_ERROR
500: the backing store failed.- See Also:
-
SEAL_UNSUPPORTED
501: the backing store cannot seal keys.- See Also:
-
UNSUPPORTED
501: the backing store lacks the primitive.- See Also:
-
STORE_TIMEOUT
504: the backing store timed out; the client reports aStoreTimeoutExceptioncause.- See Also:
-
BUSY
503: the blocking pool is full; the response carriesRetry-After: 1.- See Also:
-