public class CacheServerComm extends Object
| Constructor and Description |
|---|
CacheServerComm(String cacheServiceUrl,
int timeout)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
JobResult |
getCachedJobResult(String hash)
Searches a job result in the cache.
|
boolean |
postJobResult(String hash,
JobResult jobResult)
Adds or Updates a job result into the cache
|
public CacheServerComm(String cacheServiceUrl, int timeout)
cacheServiceUrl - cache service base URLtimeout - communication timeoutpublic JobResult getCachedJobResult(String hash) throws IOException
JobResult.EMPTY_RESULT, if not found.hash - job hash to searchIOException - there's a communication problem with the cache servicepublic boolean postJobResult(String hash, JobResult jobResult) throws IOException
hash - job hash to add/updatejobResult - job result. If null then JobResult.EMPTY_RESULTIOException - there's a communication problem with the cache serviceCopyright © 2016–2021. All rights reserved.