1 package org.apache.axis2.storage.impl; 2 import java.util.HashMap ; 3 4 21 public class AxisMemoryStorage extends AbstractStorage{ 22 23 private HashMap objectMap; 24 25 26 public AxisMemoryStorage() { 27 objectMap = new HashMap (); 28 } 29 30 public Object put(Object value) { 31 String key = getUniqueKey(); 32 objectMap.put(key,value); 33 return key; 34 35 } 36 37 public Object get(Object key) { 38 return objectMap.get(key); 39 } 40 41 public Object remove(Object key) { 42 return objectMap.remove(key); 43 } 44 45 public boolean clean() { 46 boolean returnValue = false; 47 try { 48 objectMap.clear(); 49 returnValue = true; 50 }catch(Exception e){ 51 returnValue = false; 52 } 53 return returnValue; 54 } 55 56 57 58 } 59 | Popular Tags |