mirror of
https://github.com/JHUAPL/AccumuloGraph.git
synced 2026-01-09 12:47:56 -05:00
Remove 'cacheProperty' methods from AccumuloElement
This commit is contained in:
@@ -14,7 +14,6 @@
|
||||
*/
|
||||
package edu.jhuapl.tinkerpop;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import com.tinkerpop.blueprints.Element;
|
||||
@@ -185,24 +184,4 @@ public abstract class AccumuloElement implements Element {
|
||||
PropertyCache getPropertyCache() {
|
||||
return propertyCache;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated This is used in {@link AccumuloGraph} but needs to go away.
|
||||
* @param key
|
||||
* @param value
|
||||
*/
|
||||
void cacheProperty(String key, Object value) {
|
||||
makeCache();
|
||||
propertyCache.put(key, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated This is used in {@link AccumuloGraph} but needs to go away.
|
||||
* @param props
|
||||
*/
|
||||
void cacheAllProperties(Map<String, Object> props) {
|
||||
for (String key : props.keySet()) {
|
||||
cacheProperty(key, props.get(key));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -319,7 +319,10 @@ public class AccumuloGraph implements Graph, KeyIndexableGraph, IndexableGraph {
|
||||
if (props == null) {
|
||||
return null;
|
||||
}
|
||||
((AccumuloElement) vertex).cacheAllProperties(props);
|
||||
|
||||
for (String key : props.keySet()) {
|
||||
((AccumuloElement) vertex).setPropertyInMemory(key, props.get(key));
|
||||
}
|
||||
}
|
||||
|
||||
globals.getCaches().cache(vertex, Vertex.class);
|
||||
@@ -479,11 +482,15 @@ public class AccumuloGraph implements Graph, KeyIndexableGraph, IndexableGraph {
|
||||
preload = new String[]{};
|
||||
}
|
||||
|
||||
Map<String, Object> props = globals.getEdgeWrapper().readProperties(edge, preload);
|
||||
Map<String, Object> props = globals.getEdgeWrapper()
|
||||
.readProperties(edge, preload);
|
||||
if (props == null) {
|
||||
return null;
|
||||
}
|
||||
((AccumuloElement) edge).cacheAllProperties(props);
|
||||
|
||||
for (String key : props.keySet()) {
|
||||
((AccumuloElement) edge).setPropertyInMemory(key, props.get(key));
|
||||
}
|
||||
}
|
||||
|
||||
globals.getCaches().cache(edge, Edge.class);
|
||||
|
||||
Reference in New Issue
Block a user