1 6 package com.coldcore.coloradoftp.core.impl; 7 8 import com.coldcore.coloradoftp.core.CoreStorage; 9 10 import java.util.*; 11 12 public class SyncCoreStorage implements CoreStorage { 13 14 protected Map<String ,Object > attributes; 15 16 17 public SyncCoreStorage() { 18 attributes = Collections.synchronizedMap(new HashMap<String ,Object >()); 19 } 20 21 22 public void setAttribute(String key, Object value) { 23 attributes.put(key, value); 24 } 25 26 27 public Object getAttribute(String key) { 28 return attributes.get(key); 29 } 30 31 32 public void removeAttribute(String key) { 33 attributes.remove(key); 34 } 35 36 37 public Set<String > getAttributeNames() { 38 return new HashSet<String >(attributes.keySet()); 39 } 40 } 41 | Popular Tags |