Class RedisGraphTransaction

  • All Implemented Interfaces:
    RedisGraphCacheHolder, RedisGraphTransaction, Closeable, AutoCloseable, redis.clients.jedis.commands.BasicRedisPipeline, redis.clients.jedis.commands.BinaryRedisPipeline, redis.clients.jedis.commands.BinaryScriptingCommandsPipeline, redis.clients.jedis.commands.ClusterPipeline, redis.clients.jedis.commands.MultiKeyBinaryRedisPipeline, redis.clients.jedis.commands.MultiKeyCommandsPipeline, redis.clients.jedis.commands.RedisPipeline, redis.clients.jedis.commands.ScriptingCommandsPipeline

    public class RedisGraphTransaction
    extends redis.clients.jedis.Transaction
    implements RedisGraphTransaction, RedisGraphCacheHolder
    This class is extending Jedis Transaction
    • Field Summary

      • Fields inherited from class redis.clients.jedis.Transaction

        inTransaction
      • Fields inherited from class redis.clients.jedis.MultiKeyPipelineBase

        client
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      redis.clients.jedis.Response<ResultSet> callProcedure​(String graphId, String procedure)
      Invokes stored procedures without arguments, in multi/exec context
      redis.clients.jedis.Response<ResultSet> callProcedure​(String graphId, String procedure, List<String> args)
      Invokes stored procedure with arguments, in multi/exec context
      redis.clients.jedis.Response<ResultSet> callProcedure​(String graphId, String procedure, List<String> args, Map<String,​List<String>> kwargs)
      Invoke a stored procedure, in multi/exec context
      redis.clients.jedis.Response<String> deleteGraph​(String graphId)
      Deletes the entire graph, in multi/exec context
      redis.clients.jedis.Response<ResultSet> query​(String graphId, String query)
      Execute a Cypher query.
      redis.clients.jedis.Response<ResultSet> query​(String graphId, String query, long timeout)
      Execute a Cypher query with timeout.
      redis.clients.jedis.Response<ResultSet> query​(String graphId, String query, Object... args)
      Deprecated.
      redis.clients.jedis.Response<ResultSet> query​(String graphId, String query, Map<String,​Object> params)
      Executes a cypher query with parameters.
      redis.clients.jedis.Response<ResultSet> query​(String graphId, String query, Map<String,​Object> params, long timeout)
      Executes a cypher query with parameters and timeout.
      redis.clients.jedis.Response<ResultSet> readOnlyQuery​(String graphId, String query)
      Execute a Cypher read-oly query.
      redis.clients.jedis.Response<ResultSet> readOnlyQuery​(String graphId, String query, long timeout)
      Execute a Cypher read-only query with timeout.
      redis.clients.jedis.Response<ResultSet> readOnlyQuery​(String graphId, String query, Map<String,​Object> params)
      Executes a cypher read-only query with parameters.
      redis.clients.jedis.Response<ResultSet> readOnlyQuery​(String graphId, String query, Map<String,​Object> params, long timeout)
      Executes a cypher read-only query with parameters and timeout.
      void setRedisGraphCaches​(RedisGraphCaches caches)  
      • Methods inherited from class redis.clients.jedis.Transaction

        clear, close, discard, exec, execGetResponse, getClient, getClient, setClient, watch, watch
      • Methods inherited from class redis.clients.jedis.MultiKeyPipelineBase

        bgrewriteaof, bgsave, bitop, bitop, blmove, blmove, blpop, blpop, blpop, blpop, blpop, blpop, blpopMap, brpop, brpop, brpop, brpop, brpop, brpop, brpoplpush, brpoplpush, brpopMap, bzpopmax, bzpopmax, bzpopmin, bzpopmin, clusterAddSlots, clusterDelSlots, clusterGetKeysInSlot, clusterInfo, clusterMeet, clusterNodes, clusterSetSlotImporting, clusterSetSlotMigrating, clusterSetSlotNode, configGet, configResetStat, configSet, copy, copy, copy, copy, dbSize, del, del, eval, eval, eval, eval, eval, eval, eval, evalsha, evalsha, evalsha, evalsha, evalsha, evalsha, exists, exists, flushAll, flushAll, flushDB, flushDB, georadiusByMemberStore, georadiusByMemberStore, georadiusStore, georadiusStore, info, info, keys, keys, lastsave, lmove, lmove, mget, mget, migrate, migrate, moduleList, moduleLoad, moduleUnload, mset, mset, msetnx, msetnx, pfcount, pfcount, pfmerge, pfmerge, ping, publish, publish, randomKey, randomKeyBinary, rename, rename, renamenx, renamenx, rpoplpush, rpoplpush, save, sdiff, sdiff, sdiffstore, sdiffstore, select, sendCommand, sendCommand, shutdown, sinter, sinter, sinterstore, sinterstore, smove, smove, sort, sort, sort, sort, sunion, sunion, sunionstore, sunionstore, swapDB, time, touch, touch, unlink, unlink, unwatch, xread, xread, xread, xread, xreadGroup, xreadGroup, xreadGroup, xreadGroup, zdiff, zdiff, zdiffStore, zdiffStore, zdiffWithScores, zdiffWithScores, zinter, zinter, zinterstore, zinterstore, zinterstore, zinterstore, zinterWithScores, zinterWithScores, zunion, zunion, zunionstore, zunionstore, zunionstore, zunionstore, zunionWithScores, zunionWithScores
      • Methods inherited from class redis.clients.jedis.PipelineBase

        append, append, bitcount, bitcount, bitcount, bitcount, bitfield, bitfield, bitfieldReadonly, bitfieldReadonly, bitpos, bitpos, bitpos, bitpos, blpop, blpop, brpop, brpop, decr, decr, decrBy, decrBy, del, del, dump, dump, echo, echo, exists, exists, expire, expire, expireAt, expireAt, geoadd, geoadd, geoadd, geoadd, geoadd, geoadd, geodist, geodist, geodist, geodist, geohash, geohash, geopos, geopos, georadius, georadius, georadius, georadius, georadiusByMember, georadiusByMember, georadiusByMember, georadiusByMember, georadiusByMemberReadonly, georadiusByMemberReadonly, georadiusByMemberReadonly, georadiusByMemberReadonly, georadiusReadonly, georadiusReadonly, georadiusReadonly, georadiusReadonly, get, get, getbit, getbit, getDel, getDel, getEx, getEx, getrange, getrange, getSet, getSet, hdel, hdel, hexists, hexists, hget, hget, hgetAll, hgetAll, hincrBy, hincrBy, hincrByFloat, hincrByFloat, hkeys, hkeys, hlen, hlen, hmget, hmget, hmset, hmset, hrandfield, hrandfield, hrandfield, hrandfield, hrandfieldWithValues, hrandfieldWithValues, hset, hset, hset, hset, hsetnx, hsetnx, hstrlen, hstrlen, hvals, hvals, incr, incr, incrBy, incrBy, incrByFloat, incrByFloat, lindex, lindex, linsert, linsert, llen, llen, lpop, lpop, lpop, lpop, lpos, lpos, lpos, lpos, lpos, lpos, lpush, lpush, lpushx, lpushx, lrange, lrange, lrem, lrem, lset, lset, ltrim, ltrim, migrate, migrate, move, move, objectEncoding, objectEncoding, objectFreq, objectFreq, objectIdletime, objectIdletime, objectRefcount, objectRefcount, persist, persist, pexpire, pexpire, pexpireAt, pexpireAt, pfadd, pfadd, pfcount, pfcount, psetex, psetex, pttl, pttl, restore, restore, restore, restore, restoreReplace, restoreReplace, rpop, rpop, rpop, rpop, rpush, rpush, rpushx, rpushx, sadd, sadd, scard, scard, sendCommand, sendCommand, set, set, set, set, setbit, setbit, setex, setex, setnx, setnx, setrange, setrange, sismember, sismember, smembers, smembers, smismember, smismember, sort, sort, sort, sort, spop, spop, spop, spop, srandmember, srandmember, srandmember, srandmember, srem, srem, strlen, strlen, substr, substr, touch, touch, ttl, ttl, type, type, unlink, unlink, xack, xack, xadd, xadd, xadd, xadd, xadd, xadd, xclaim, xclaim, xclaim, xclaim, xclaimJustId, xclaimJustId, xdel, xdel, xgroupCreate, xgroupCreate, xgroupDelConsumer, xgroupDelConsumer, xgroupDestroy, xgroupDestroy, xgroupSetID, xgroupSetID, xlen, xlen, xpending, xpending, xpending, xpending, xpending, xpending, xpendingBinary, xrange, xrange, xrange, xrange, xrevrange, xrevrange, xrevrange, xrevrange, xtrim, xtrim, xtrim, xtrim, zadd, zadd, zadd, zadd, zadd, zadd, zadd, zadd, zaddIncr, zaddIncr, zcard, zcard, zcount, zcount, zcount, zcount, zincrby, zincrby, zincrby, zincrby, zlexcount, zlexcount, zmscore, zmscore, zpopmax, zpopmax, zpopmax, zpopmax, zpopmin, zpopmin, zpopmin, zpopmin, zrandmember, zrandmember, zrandmember, zrandmember, zrandmemberWithScores, zrandmemberWithScores, zrange, zrange, zrangeByLex, zrangeByLex, zrangeByLex, zrangeByLex, zrangeByScore, zrangeByScore, zrangeByScore, zrangeByScore, zrangeByScore, zrangeByScore, zrangeByScore, zrangeByScore, zrangeByScoreWithScores, zrangeByScoreWithScores, zrangeByScoreWithScores, zrangeByScoreWithScores, zrangeByScoreWithScores, zrangeByScoreWithScores, zrangeByScoreWithScores, zrangeByScoreWithScores, zrangeWithScores, zrangeWithScores, zrank, zrank, zrem, zrem, zremrangeByLex, zremrangeByLex, zremrangeByRank, zremrangeByRank, zremrangeByScore, zremrangeByScore, zremrangeByScore, zremrangeByScore, zrevrange, zrevrange, zrevrangeByLex, zrevrangeByLex, zrevrangeByLex, zrevrangeByLex, zrevrangeByScore, zrevrangeByScore, zrevrangeByScore, zrevrangeByScore, zrevrangeByScore, zrevrangeByScore, zrevrangeByScore, zrevrangeByScore, zrevrangeByScoreWithScores, zrevrangeByScoreWithScores, zrevrangeByScoreWithScores, zrevrangeByScoreWithScores, zrevrangeByScoreWithScores, zrevrangeByScoreWithScores, zrevrangeByScoreWithScores, zrevrangeByScoreWithScores, zrevrangeWithScores, zrevrangeWithScores, zrevrank, zrevrank, zscore, zscore
      • Methods inherited from class redis.clients.jedis.Queable

        clean, generateResponse, getPipelinedResponseLength, getResponse, hasPipelinedResponse
      • Methods inherited from interface redis.clients.jedis.commands.BasicRedisPipeline

        bgrewriteaof, bgsave, configGet, configResetStat, configSet, dbSize, flushAll, flushAll, flushDB, flushDB, info, lastsave, migrate, moduleList, moduleLoad, moduleUnload, ping, save, select, shutdown, swapDB, time
      • Methods inherited from interface redis.clients.jedis.commands.BinaryRedisPipeline

        append, bitcount, bitcount, bitfield, bitfieldReadonly, bitpos, bitpos, blpop, brpop, decr, decrBy, del, dump, echo, exists, expire, expire, expireAt, geoadd, geoadd, geoadd, geodist, geodist, geohash, geopos, georadius, georadius, georadiusByMember, georadiusByMember, georadiusByMemberReadonly, georadiusByMemberReadonly, georadiusReadonly, georadiusReadonly, get, getbit, getDel, getEx, getrange, getSet, hdel, hexists, hget, hgetAll, hincrBy, hincrByFloat, hkeys, hlen, hmget, hmset, hrandfield, hrandfield, hrandfieldWithValues, hset, hset, hsetnx, hstrlen, hvals, incr, incrBy, incrByFloat, lindex, linsert, llen, lpop, lpop, lpos, lpos, lpos, lpush, lpushx, lrange, lrem, lset, ltrim, migrate, move, objectEncoding, objectFreq, objectIdletime, objectRefcount, persist, pexpire, pexpireAt, pfadd, pfcount, psetex, pttl, restore, restore, restore, restoreReplace, restoreReplace, rpop, rpop, rpush, rpushx, sadd, scard, set, set, setbit, setex, setex, setnx, setrange, setrange, sismember, smembers, smismember, sort, sort, spop, spop, srandmember, srandmember, srem, strlen, substr, touch, ttl, type, unlink, xack, xadd, xadd, xadd, xclaim, xclaim, xclaimJustId, xdel, xgroupCreate, xgroupDelConsumer, xgroupDestroy, xgroupSetID, xlen, xpending, xpending, xpending, xpendingBinary, xrange, xrange, xrevrange, xrevrange, xtrim, xtrim, zadd, zadd, zadd, zadd, zaddIncr, zcard, zcount, zcount, zincrby, zincrby, zlexcount, zmscore, zpopmax, zpopmax, zpopmin, zpopmin, zrandmember, zrandmember, zrandmemberWithScores, zrange, zrangeByLex, zrangeByLex, zrangeByScore, zrangeByScore, zrangeByScore, zrangeByScore, zrangeByScoreWithScores, zrangeByScoreWithScores, zrangeByScoreWithScores, zrangeByScoreWithScores, zrangeWithScores, zrank, zrem, zremrangeByLex, zremrangeByRank, zremrangeByScore, zremrangeByScore, zrevrange, zrevrangeByLex, zrevrangeByLex, zrevrangeByScore, zrevrangeByScore, zrevrangeByScore, zrevrangeByScore, zrevrangeByScoreWithScores, zrevrangeByScoreWithScores, zrevrangeByScoreWithScores, zrevrangeByScoreWithScores, zrevrangeWithScores, zrevrank, zscore
      • Methods inherited from interface redis.clients.jedis.commands.BinaryScriptingCommandsPipeline

        eval, eval, eval, eval, evalsha, evalsha, evalsha
      • Methods inherited from interface redis.clients.jedis.commands.ClusterPipeline

        clusterAddSlots, clusterDelSlots, clusterGetKeysInSlot, clusterInfo, clusterMeet, clusterNodes, clusterSetSlotImporting, clusterSetSlotMigrating, clusterSetSlotNode
      • Methods inherited from interface redis.clients.jedis.commands.MultiKeyBinaryRedisPipeline

        bitop, blmove, blpop, blpop, brpop, brpop, brpoplpush, bzpopmax, bzpopmin, copy, copy, del, exists, georadiusByMemberStore, georadiusStore, keys, lmove, mget, migrate, mset, msetnx, pfcount, pfmerge, publish, randomKeyBinary, rename, renamenx, rpoplpush, sdiff, sdiffstore, sinter, sinterstore, smove, sort, sort, sunion, sunionstore, touch, unlink, unwatch, watch, xread, xread, xreadGroup, xreadGroup, zdiff, zdiffStore, zdiffWithScores, zinter, zinterstore, zinterstore, zinterWithScores, zunion, zunionstore, zunionstore, zunionWithScores
      • Methods inherited from interface redis.clients.jedis.commands.MultiKeyCommandsPipeline

        bitop, blmove, blpop, blpop, blpop, brpop, brpop, brpop, brpoplpush, bzpopmax, bzpopmin, copy, copy, del, exists, georadiusByMemberStore, georadiusStore, keys, lmove, mget, migrate, mset, msetnx, pfcount, pfmerge, publish, randomKey, rename, renamenx, rpoplpush, sdiff, sdiffstore, sinter, sinterstore, smove, sort, sort, sunion, sunionstore, touch, unlink, unwatch, watch, xread, xread, xreadGroup, xreadGroup, zdiff, zdiffStore, zdiffWithScores, zinter, zinterstore, zinterstore, zinterWithScores, zunion, zunionstore, zunionstore, zunionWithScores
      • Methods inherited from interface redis.clients.jedis.commands.RedisPipeline

        append, bitcount, bitcount, bitfield, bitfieldReadonly, bitpos, bitpos, blpop, brpop, decr, decrBy, del, dump, echo, exists, expire, expire, expireAt, geoadd, geoadd, geoadd, geodist, geodist, geohash, geopos, georadius, georadius, georadiusByMember, georadiusByMember, georadiusByMemberReadonly, georadiusByMemberReadonly, georadiusReadonly, georadiusReadonly, get, getbit, getDel, getEx, getrange, getSet, hdel, hexists, hget, hgetAll, hincrBy, hincrByFloat, hkeys, hlen, hmget, hmset, hrandfield, hrandfield, hrandfieldWithValues, hset, hset, hsetnx, hstrlen, hvals, incr, incrBy, incrByFloat, lindex, linsert, llen, lpop, lpop, lpos, lpos, lpos, lpush, lpushx, lrange, lrem, lset, ltrim, migrate, move, objectEncoding, objectFreq, objectIdletime, objectRefcount, persist, pexpire, pexpireAt, pfadd, pfcount, psetex, pttl, restore, restore, restore, restoreReplace, restoreReplace, rpop, rpop, rpush, rpushx, sadd, scard, set, set, setbit, setex, setex, setnx, setrange, sismember, smembers, smismember, sort, sort, spop, spop, srandmember, srandmember, srem, strlen, substr, touch, ttl, type, unlink, xack, xadd, xadd, xadd, xclaim, xclaim, xclaimJustId, xdel, xgroupCreate, xgroupDelConsumer, xgroupDestroy, xgroupSetID, xlen, xpending, xpending, xpending, xrange, xrange, xrevrange, xrevrange, xtrim, xtrim, zadd, zadd, zadd, zadd, zaddIncr, zcard, zcount, zcount, zincrby, zincrby, zlexcount, zmscore, zpopmax, zpopmax, zpopmin, zpopmin, zrandmember, zrandmember, zrandmemberWithScores, zrange, zrangeByLex, zrangeByLex, zrangeByScore, zrangeByScore, zrangeByScore, zrangeByScore, zrangeByScoreWithScores, zrangeByScoreWithScores, zrangeByScoreWithScores, zrangeByScoreWithScores, zrangeWithScores, zrank, zrem, zremrangeByLex, zremrangeByRank, zremrangeByScore, zremrangeByScore, zrevrange, zrevrangeByLex, zrevrangeByLex, zrevrangeByScore, zrevrangeByScore, zrevrangeByScore, zrevrangeByScore, zrevrangeByScoreWithScores, zrevrangeByScoreWithScores, zrevrangeByScoreWithScores, zrevrangeByScoreWithScores, zrevrangeWithScores, zrevrank, zscore
      • Methods inherited from interface redis.clients.jedis.commands.ScriptingCommandsPipeline

        eval, eval, eval, evalsha, evalsha, evalsha
    • Constructor Detail

      • RedisGraphTransaction

        public RedisGraphTransaction​(redis.clients.jedis.Client client,
                                     RedisGraph redisGraph)
    • Method Detail

      • query

        public redis.clients.jedis.Response<ResultSet> query​(String graphId,
                                                             String query)
        Execute a Cypher query.
        Specified by:
        query in interface RedisGraphTransaction
        Parameters:
        graphId - a graph to perform the query on
        query - Cypher query
        Returns:
        a response which builds the result set with the query answer.
      • readOnlyQuery

        public redis.clients.jedis.Response<ResultSet> readOnlyQuery​(String graphId,
                                                                     String query)
        Execute a Cypher read-oly query.
        Specified by:
        readOnlyQuery in interface RedisGraphTransaction
        Parameters:
        graphId - a graph to perform the query on
        query - Cypher query
        Returns:
        a response which builds the result set with the query answer.
      • query

        public redis.clients.jedis.Response<ResultSet> query​(String graphId,
                                                             String query,
                                                             long timeout)
        Execute a Cypher query with timeout. NOTE: timeout is simply sent to DB. Socket timeout will not be changed.
        Specified by:
        query in interface RedisGraphTransaction
        Parameters:
        graphId - a graph to perform the query on
        query - Cypher query
        timeout -
        Returns:
        a response which builds the result set with the query answer.
      • readOnlyQuery

        public redis.clients.jedis.Response<ResultSet> readOnlyQuery​(String graphId,
                                                                     String query,
                                                                     long timeout)
        Execute a Cypher read-only query with timeout. NOTE: timeout is simply sent to DB. Socket timeout will not be changed.
        Specified by:
        readOnlyQuery in interface RedisGraphTransaction
        Parameters:
        graphId - a graph to perform the query on
        query - Cypher query
        timeout -
        Returns:
        a response which builds the result set with the query answer.
      • query

        public redis.clients.jedis.Response<ResultSet> query​(String graphId,
                                                             String query,
                                                             Map<String,​Object> params)
        Executes a cypher query with parameters.
        Specified by:
        query in interface RedisGraphTransaction
        Parameters:
        graphId - a graph to perform the query on.
        query - Cypher query.
        params - parameters map.
        Returns:
        a response which builds the result set with the query answer.
      • readOnlyQuery

        public redis.clients.jedis.Response<ResultSet> readOnlyQuery​(String graphId,
                                                                     String query,
                                                                     Map<String,​Object> params)
        Executes a cypher read-only query with parameters.
        Specified by:
        readOnlyQuery in interface RedisGraphTransaction
        Parameters:
        graphId - a graph to perform the query on.
        query - Cypher query.
        params - parameters map.
        Returns:
        a response which builds the result set with the query answer.
      • query

        public redis.clients.jedis.Response<ResultSet> query​(String graphId,
                                                             String query,
                                                             Map<String,​Object> params,
                                                             long timeout)
        Executes a cypher query with parameters and timeout. NOTE: timeout is simply sent to DB. Socket timeout will not be changed. timeout.
        Specified by:
        query in interface RedisGraphTransaction
        Parameters:
        graphId - a graph to perform the query on.
        query - Cypher query.
        params - parameters map.
        timeout -
        Returns:
        a response which builds the result set with the query answer.
      • readOnlyQuery

        public redis.clients.jedis.Response<ResultSet> readOnlyQuery​(String graphId,
                                                                     String query,
                                                                     Map<String,​Object> params,
                                                                     long timeout)
        Executes a cypher read-only query with parameters and timeout. NOTE: timeout is simply sent to DB. Socket timeout will not be changed. timeout.
        Specified by:
        readOnlyQuery in interface RedisGraphTransaction
        Parameters:
        graphId - a graph to perform the query on.
        query - Cypher query.
        params - parameters map.
        timeout -
        Returns:
        a response which builds the result set with the query answer.
      • callProcedure

        public redis.clients.jedis.Response<ResultSet> callProcedure​(String graphId,
                                                                     String procedure)
        Invokes stored procedures without arguments, in multi/exec context
        Specified by:
        callProcedure in interface RedisGraphTransaction
        Parameters:
        graphId - a graph to perform the query on
        procedure - procedure name to invoke
        Returns:
        response with result set with the procedure data
      • callProcedure

        public redis.clients.jedis.Response<ResultSet> callProcedure​(String graphId,
                                                                     String procedure,
                                                                     List<String> args)
        Invokes stored procedure with arguments, in multi/exec context
        Specified by:
        callProcedure in interface RedisGraphTransaction
        Parameters:
        graphId - a graph to perform the query on
        procedure - procedure name to invoke
        args - procedure arguments
        Returns:
        response with result set with the procedure data
      • callProcedure

        public redis.clients.jedis.Response<ResultSet> callProcedure​(String graphId,
                                                                     String procedure,
                                                                     List<String> args,
                                                                     Map<String,​List<String>> kwargs)
        Invoke a stored procedure, in multi/exec context
        Specified by:
        callProcedure in interface RedisGraphTransaction
        Parameters:
        graphId - a graph to perform the query on
        procedure - - procedure to execute
        args - - procedure arguments
        kwargs - - procedure output arguments
        Returns:
        response with result set with the procedure data
      • deleteGraph

        public redis.clients.jedis.Response<String> deleteGraph​(String graphId)
        Deletes the entire graph, in multi/exec context
        Specified by:
        deleteGraph in interface RedisGraphTransaction
        Parameters:
        graphId - graph to delete
        Returns:
        response with the deletion running time statistics