|
|
@ -35,10 +35,12 @@ public class ThreadLocalScopeCache implements ScopeCache { |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public Object remove(String name) { |
|
|
|
public Object remove(String name) { |
|
|
|
return this.data.get().remove(name); |
|
|
|
return this.data.get().remove(name); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public Collection<Object> clear() { |
|
|
|
public Collection<Object> clear() { |
|
|
|
ConcurrentMap<String, Object> map = this.data.get(); |
|
|
|
ConcurrentMap<String, Object> map = this.data.get(); |
|
|
|
Collection<Object> values = new ArrayList<Object>(map.values()); |
|
|
|
Collection<Object> values = new ArrayList<Object>(map.values()); |
|
|
@ -46,10 +48,12 @@ public class ThreadLocalScopeCache implements ScopeCache { |
|
|
|
return values; |
|
|
|
return values; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public Object get(String name) { |
|
|
|
public Object get(String name) { |
|
|
|
return this.data.get().get(name); |
|
|
|
return this.data.get().get(name); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public Object put(String name, Object value) { |
|
|
|
public Object put(String name, Object value) { |
|
|
|
Object result = this.data.get().putIfAbsent(name, value); |
|
|
|
Object result = this.data.get().putIfAbsent(name, value); |
|
|
|
if (result != null) { |
|
|
|
if (result != null) { |
|
|
|