public String putObject(String objectId, Object obj) { cachedObjects.put(objectId, obj); return objectId; }
/** * Retrieve an earlier saved object given its ID * * @param objectId * @return */ public Object getObject(String objectId) { return cachedObjects.get(objectId); }
/** * Save a given object in memory for later (quick server-side) retrieval * * @param obj * @return */ public String putObject(Object obj) { String objectId = UUID.randomUUID().toString(); cachedObjects.put(objectId, obj); return objectId; }