コード例 #1
0
 @RequestMapping(value = "/admin/accounts/{accountId}/pools", method = RequestMethod.POST)
 @ResponseBody
 public PoolConfigurationModel createAccountPool(
     @PathVariable("accountId") Long accountId, @RequestBody String poolSettingJson) {
   Long poolId = poolDao.createPool(accountId, poolSettingJson);
   nodeManagementExecutor.start(poolDao.readPoolById(poolId).poolSettings);
   return poolDao.readPoolById(poolId);
 }
コード例 #2
0
 @RequestMapping(
     value = "/admin/accounts/{accountId}/pools/{poolId}/delete",
     method = RequestMethod.POST)
 @ResponseBody
 public boolean deleteAccountPool(
     @PathVariable("accountId") Long accountId, @PathVariable("poolId") Long poolConfigurationId) {
   nodeManagementExecutor.stop(poolDao.readPoolById(poolConfigurationId).poolSettings);
   return poolDao.deletePool(poolConfigurationId, accountId);
 }
コード例 #3
0
 @RequestMapping(value = "/admin/accounts/{accountId}/pools/{poolId}", method = RequestMethod.POST)
 @ResponseBody
 public boolean updateAccountPool(
     @PathVariable("accountId") Long accountId,
     @PathVariable("poolId") Long poolConfigurationId,
     @RequestBody String newPoolSettingJson) {
   boolean updated = poolDao.updatePool(poolConfigurationId, accountId, newPoolSettingJson);
   nodeManagementExecutor.update(poolDao.readPoolById(poolConfigurationId).poolSettings);
   return updated;
 }