Class CounterController

java.lang.Object
com.loomcache.springboot.controller.CounterController

@RestController @Conditional(LoomServerEnabledCondition.class) @RequestMapping("/api/counter") public class CounterController extends Object
REST controller for the default PN-counter CRDT.
  • Constructor Details

    • CounterController

      public CounterController(PNCounter defaultCounter)
  • Method Details

    • value

      @RolesAllowed({"ADMIN","USER","READONLY"}) @GetMapping public org.springframework.http.ResponseEntity<Map<String,Object>> value()
    • increment

      @RolesAllowed({"ADMIN","USER"}) @PostMapping("/increment") public org.springframework.http.ResponseEntity<Map<String,Object>> increment(@RequestParam(defaultValue="1") long delta)
    • decrement

      @RolesAllowed({"ADMIN","USER"}) @PostMapping("/decrement") public org.springframework.http.ResponseEntity<Map<String,Object>> decrement(@RequestParam(defaultValue="1") long delta)