Code example for Cache

Methods: put

        return vertexIdCache.get(hash);
    public void addCachedVertex(String hash, Vertex entityVertex) {
        this.vertexIdCache.put(hash, entityVertex.getId());
        this.vertexCache.put(hash, entityVertex);
    public Vertex getVertex(Graph graph, String hash, Authorizations authorizations) {
        Vertex vertex = vertexCache.getIfPresent(hash);
        if (vertex != null) {
            return vertex;
        String vertexId = getCachedVertexId(hash);
        if (vertexId != null) {
            return graph.getVertex(vertexId, authorizations);
        return null; 
Connect your IDE to all the code out there  Get Codota for Java