private String pathOfJob(ExecutablePO job) { return pathOfJob(job.getUuid()); }
public ExecutablePO getJob(String uuid) throws PersistentException { try { return readJobResource(pathOfJob(uuid)); } catch (IOException e) { logger.error("error get job:" + uuid, e); throw new PersistentException(e); } }
public void deleteJob(String uuid) throws PersistentException { try { store.deleteResource(pathOfJob(uuid)); executableDigestMap.remove(uuid); } catch (IOException e) { logger.error("error delete job:" + uuid, e); throw new PersistentException(e); } }
public ExecutablePO updateJob(ExecutablePO job) throws PersistentException { try { if (getJob(job.getUuid()) == null) { throw new IllegalArgumentException("job id:" + job.getUuid() + " does not exist"); } writeJobResource(pathOfJob(job), job); executableDigestMap.put(job.getId(), job); return job; } catch (IOException e) { logger.error("error update job:" + job.getUuid(), e); throw new PersistentException(e); } }
public ExecutablePO addJob(ExecutablePO job) throws PersistentException { try { if (getJob(job.getUuid()) != null) { throw new IllegalArgumentException("job id:" + job.getUuid() + " already exists"); } writeJobResource(pathOfJob(job), job); executableDigestMap.put(job.getId(), job); return job; } catch (IOException e) { logger.error("error save job:" + job.getUuid(), e); throw new PersistentException(e); } }
private String pathOfJob(ExecutablePO job) { return pathOfJob(job.getUuid()); } private String pathOfJob(String uuid) {
public void deleteJob(String uuid) throws PersistentException { try { store.deleteResource(pathOfJob(uuid)); } catch (IOException e) { logger.error("error delete job:" + uuid, e); throw new PersistentException(e); } }
public ExecutablePO getJob(String uuid) throws PersistentException { try { return readJobResource(pathOfJob(uuid)); } catch (IOException e) { logger.error("error get job:" + uuid, e); throw new PersistentException(e); } }
public ExecutablePO addJob(ExecutablePO job) throws PersistentException { try { if (getJob(job.getUuid()) != null) { throw new IllegalArgumentException("job id:" + job.getUuid() + " already exists"); } writeJobResource(pathOfJob(job), job); return job; } catch (IOException e) { logger.error("error save job:" + job.getUuid(), e); throw new PersistentException(e); } }
private String pathOfJob(ExecutablePO job) { return pathOfJob(job.getUuid()); }
private String pathOfJob(ExecutablePO job) { return pathOfJob(job.getUuid()); }
public ExecutablePO getJob(String uuid) throws PersistentException { try { return readJobResource(pathOfJob(uuid)); } catch (IOException e) { logger.error("error get job:" + uuid, e); throw new PersistentException(e); } }
public ExecutablePO getJob(String uuid) throws PersistentException { try { return readJobResource(pathOfJob(uuid)); } catch (IOException e) { logger.error("error get job:" + uuid, e); throw new PersistentException(e); } }
public void deleteJob(String uuid) throws PersistentException { try { store.deleteResource(pathOfJob(uuid)); } catch (IOException e) { logger.error("error delete job:" + uuid, e); throw new PersistentException(e); } }
public void deleteJob(String uuid) throws PersistentException { try { store.deleteResource(pathOfJob(uuid)); executableDigestMap.remove(uuid); } catch (IOException e) { logger.error("error delete job:" + uuid, e); throw new PersistentException(e); } }
public ExecutablePO addJob(ExecutablePO job) throws PersistentException { try { if (getJob(job.getUuid()) != null) { throw new IllegalArgumentException("job id:" + job.getUuid() + " already exists"); } writeJobResource(pathOfJob(job), job); return job; } catch (IOException e) { logger.error("error save job:" + job.getUuid(), e); throw new PersistentException(e); } }
public ExecutablePO addJob(ExecutablePO job) throws PersistentException { try { if (getJob(job.getUuid()) != null) { throw new IllegalArgumentException("job id:" + job.getUuid() + " already exists"); } writeJobResource(pathOfJob(job), job); executableDigestMap.put(job.getId(), job); return job; } catch (IOException e) { logger.error("error save job:" + job.getUuid(), e); throw new PersistentException(e); } }
public ExecutablePO updateJob(ExecutablePO job) throws PersistentException { try { if (getJob(job.getUuid()) == null) { throw new IllegalArgumentException("job id:" + job.getUuid() + " does not exist"); } writeJobResource(pathOfJob(job), job); executableDigestMap.put(job.getId(), job); return job; } catch (IOException e) { logger.error("error update job:" + job.getUuid(), e); throw new PersistentException(e); } }