Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 36 additions & 36 deletions protocol-definitions/AtomicLong.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: AtomicLong
methods:
- id: 1
name: apply
since: 2.0
since: "2.0"
doc: |
Applies a function on the value, the actual stored value will not change
request:
Expand All @@ -13,19 +13,19 @@ methods:
- name: groupId
type: RaftGroupId
nullable: false
since: 2.0
since: "2.0"
doc: |
CP group id of this IAtomicLong instance.
- name: name
type: String
nullable: false
since: 2.0
since: "2.0"
doc: |
Name of this IAtomicLong instance.
- name: function
type: Data
nullable: false
since: 2.0
since: "2.0"
doc: |
The function applied to the value and the value is not
changed.
Expand All @@ -34,12 +34,12 @@ methods:
- name: response
type: Data
nullable: true
since: 2.0
since: "2.0"
doc: |
The result of the function application.
- id: 2
name: alter
since: 2.0
since: "2.0"
doc: |
Alters the currently stored value by applying a function on it.
request:
Expand All @@ -49,38 +49,38 @@ methods:
- name: groupId
type: RaftGroupId
nullable: false
since: 2.0
since: "2.0"
doc: |
CP group id of this IAtomicLong instance.
- name: name
type: String
nullable: false
since: 2.0
since: "2.0"
doc: |
Name of this IAtomicLong instance.
- name: function
type: Data
nullable: false
since: 2.0
since: "2.0"
doc: |
The function applied to the currently stored value.
- name: returnValueType
type: int
nullable: false
since: 2.0
since: "2.0"
doc: |
0 returns the old value, 1 returns the new value
response:
params:
- name: response
type: long
nullable: false
since: 2.0
since: "2.0"
doc: |
The old or the new value depending on the returnValueType parameter.
- id: 3
name: addAndGet
since: 2.0
since: "2.0"
doc: |
Atomically adds the given value to the current value.
request:
Expand All @@ -90,32 +90,32 @@ methods:
- name: groupId
type: RaftGroupId
nullable: false
since: 2.0
since: "2.0"
doc: |
CP group id of this IAtomicLong instance.
- name: name
type: String
nullable: false
since: 2.0
since: "2.0"
doc: |
Name of this IAtomicLong instance.
- name: delta
type: long
nullable: false
since: 2.0
since: "2.0"
doc: |
The value to add to the current value
response:
params:
- name: response
type: long
nullable: false
since: 2.0
since: "2.0"
doc: |
the updated value, the given value added to the current value
- id: 4
name: compareAndSet
since: 2.0
since: "2.0"
doc: |
Atomically sets the value to the given updated value only if the current
value the expected value.
Expand All @@ -126,39 +126,39 @@ methods:
- name: groupId
type: RaftGroupId
nullable: false
since: 2.0
since: "2.0"
doc: |
CP group id of this IAtomicLong instance.
- name: name
type: String
nullable: false
since: 2.0
since: "2.0"
doc: |
Name of this IAtomicLong instance.
- name: expected
type: long
nullable: false
since: 2.0
since: "2.0"
doc: |
The expected value
- name: updated
type: long
nullable: false
since: 2.0
since: "2.0"
doc: |
The new value
response:
params:
- name: response
type: boolean
nullable: false
since: 2.0
since: "2.0"
doc: |
true if successful; or false if the actual value
was not equal to the expected value.
- id: 5
name: get
since: 2.0
since: "2.0"
doc: |
Gets the current value.
request:
Expand All @@ -168,26 +168,26 @@ methods:
- name: groupId
type: RaftGroupId
nullable: false
since: 2.0
since: "2.0"
doc: |
CP group id of this IAtomicLong instance.
- name: name
type: String
nullable: false
since: 2.0
since: "2.0"
doc: |
Name of this IAtomicLong instance.
response:
params:
- name: response
type: long
nullable: false
since: 2.0
since: "2.0"
doc: |
The current value
- id: 6
name: getAndAdd
since: 2.0
since: "2.0"
doc: |
Atomically adds the given value to the current value.
request:
Expand All @@ -197,32 +197,32 @@ methods:
- name: groupId
type: RaftGroupId
nullable: false
since: 2.0
since: "2.0"
doc: |
CP group id of this IAtomicLong instance.
- name: name
type: String
nullable: false
since: 2.0
since: "2.0"
doc: |
Name of this IAtomicLong instance.
- name: delta
type: long
nullable: false
since: 2.0
since: "2.0"
doc: |
The value to add to the current value
response:
params:
- name: response
type: long
nullable: false
since: 2.0
since: "2.0"
doc: |
the old value before the add
- id: 7
name: getAndSet
since: 2.0
since: "2.0"
doc: |
Atomically sets the given value and returns the old value.
request:
Expand All @@ -232,26 +232,26 @@ methods:
- name: groupId
type: RaftGroupId
nullable: false
since: 2.0
since: "2.0"
doc: |
CP group id of this IAtomicLong instance.
- name: name
type: String
nullable: false
since: 2.0
since: "2.0"
doc: |
Name of this IAtomicLong instance.
- name: newValue
type: long
nullable: false
since: 2.0
since: "2.0"
doc: |
The new value
response:
params:
- name: response
type: long
nullable: false
since: 2.0
since: "2.0"
doc: |
the old value
Loading