01: /*
02: * All content copyright (c) 2003-2007 Terracotta, Inc., except as may otherwise be noted in a separate copyright
03: * notice. All rights reserved.
04: */
05: package com.tc.objectserver.persistence.impl;
06:
07: import com.tc.objectserver.persistence.api.PersistentMapStore;
08:
09: import java.util.Hashtable;
10: import java.util.Map;
11:
12: public class InMemoryPersistentMapStore implements PersistentMapStore {
13:
14: Map map = new Hashtable();
15:
16: public String get(String key) {
17: return (String) map.get(key);
18: }
19:
20: public void put(String key, String value) {
21: map.put(key, value);
22: }
23:
24: public boolean remove(String key) {
25: return (map.remove(key) != null);
26: }
27:
28: }
|