Esempio n. 1
0
 public String putObject(String objectId, Object obj) {
   cachedObjects.put(objectId, obj);
   return objectId;
 }
Esempio n. 2
0
 /**
  * Retrieve an earlier saved object given its ID
  *
  * @param objectId
  * @return
  */
 public Object getObject(String objectId) {
   return cachedObjects.get(objectId);
 }
Esempio n. 3
0
 /**
  * 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;
 }