Class AtomicController
java.lang.Object
com.loomcache.springboot.controller.AtomicController
@RestController
@Conditional(LoomServerEnabledCondition.class)
@RequestMapping("/api/atomic")
public class AtomicController
extends Object
REST controller for the default CP atomic values.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final recordstatic final recordstatic final recordstatic final record -
Constructor Summary
ConstructorsConstructorDescriptionAtomicController(LinearizableAtomicLong defaultAtomicLong, LinearizableAtomicReference<String> defaultAtomicReference) -
Method Summary
Modifier and TypeMethodDescriptionaddLong(@Nullable AtomicController.DeltaRequest request) compareAndSetLong(@Nullable AtomicController.AtomicLongCasRequest request) compareAndSetReference(@Nullable AtomicController.ReferenceCasRequest request) getLong()setLong(@Nullable AtomicController.AtomicLongValue request)
-
Constructor Details
-
AtomicController
public AtomicController(LinearizableAtomicLong defaultAtomicLong, LinearizableAtomicReference<String> defaultAtomicReference)
-
-
Method Details
-
getLong
-
setLong
@RolesAllowed({"ADMIN","USER"}) @PutMapping("/long") public org.springframework.http.ResponseEntity<Map<String,Long>> setLong(@RequestBody @Nullable AtomicController.AtomicLongValue request) -
addLong
@RolesAllowed({"ADMIN","USER"}) @PostMapping("/long/add") public org.springframework.http.ResponseEntity<Map<String,Long>> addLong(@RequestBody @Nullable AtomicController.DeltaRequest request) -
incrementLong
-
decrementLong
-
compareAndSetLong
@RolesAllowed({"ADMIN","USER"}) @PostMapping("/long/cas") public org.springframework.http.ResponseEntity<Map<String,Object>> compareAndSetLong(@RequestBody @Nullable AtomicController.AtomicLongCasRequest request) -
getReference
-
setReference
@RolesAllowed({"ADMIN","USER"}) @PutMapping("/reference") public org.springframework.http.ResponseEntity<Map<String, @Nullable Object>> setReference(@RequestBody AtomicController.ReferenceValue request) -
clearReference
-
compareAndSetReference
@RolesAllowed({"ADMIN","USER"}) @PostMapping("/reference/cas") public org.springframework.http.ResponseEntity<Map<String, @Nullable Object>> compareAndSetReference(@RequestBody @Nullable AtomicController.ReferenceCasRequest request)
-