Remove 'cacheProperty' methods from AccumuloElement

This commit is contained in:
Michael Lieberman
2015-01-23 13:28:11 -05:00
parent b60f855a5e
commit 6fffd094f3
2 changed files with 10 additions and 24 deletions

View File

@@ -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));
}
}
}

View File

@@ -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);