public class JReJSON extends Object
Modifier and Type | Class and Description |
---|---|
static class |
JReJSON.ExistenceModifier |
Constructor and Description |
---|
JReJSON()
Creates a client to the local machine
|
JReJSON(redis.clients.jedis.util.Pool<redis.clients.jedis.Jedis> jedis)
Creates a client using provided Jedis pool
|
JReJSON(String host,
int port)
Creates a client to the specific host/post
|
Modifier and Type | Method and Description |
---|---|
static Long |
del(redis.clients.jedis.Jedis conn,
String key,
com.tsoft.jenkins.plugin.rejson.Path... path)
Deprecated.
use
del(String, Path) instead |
Long |
del(String key)
Deletes the root path
|
Long |
del(String key,
com.tsoft.jenkins.plugin.rejson.Path path)
Deletes a path
|
static Object |
get(redis.clients.jedis.Jedis conn,
String key,
com.tsoft.jenkins.plugin.rejson.Path... paths)
Deprecated.
use
get(String, Path...) instead |
<T> T |
get(String key)
Gets an object at the root path
|
<T> T |
get(String key,
com.tsoft.jenkins.plugin.rejson.Path... paths)
Gets an object
|
redis.clients.jedis.Jedis |
getConnection() |
List<String> |
keys()
Get all Keys
|
static void |
set(redis.clients.jedis.Jedis conn,
String key,
Object object,
JReJSON.ExistenceModifier flag,
com.tsoft.jenkins.plugin.rejson.Path... path)
Deprecated.
use
set(String, Object, ExistenceModifier, Path) instead |
static void |
set(redis.clients.jedis.Jedis conn,
String key,
Object object,
com.tsoft.jenkins.plugin.rejson.Path... path)
Deprecated.
use
set(String, Object, ExistenceModifier, Path) instead |
void |
set(String key,
Object object)
Sets an object in the root path
|
void |
set(String key,
Object object,
JReJSON.ExistenceModifier flag)
Sets an object at the root path
|
void |
set(String key,
Object object,
JReJSON.ExistenceModifier flag,
com.tsoft.jenkins.plugin.rejson.Path path)
Sets an object
|
void |
set(String key,
Object object,
com.tsoft.jenkins.plugin.rejson.Path path)
Sets an object without caring about target path existing
|
static Class<?> |
type(redis.clients.jedis.Jedis conn,
String key,
com.tsoft.jenkins.plugin.rejson.Path... path)
Deprecated.
use
type(String, Path) instead |
Class<?> |
type(String key)
Gets the class of an object at the root path
|
Class<?> |
type(String key,
com.tsoft.jenkins.plugin.rejson.Path path)
Gets the class of an object
|
public JReJSON()
public JReJSON(String host, int port)
host
- Redis hostport
- Redis portpublic JReJSON(redis.clients.jedis.util.Pool<redis.clients.jedis.Jedis> jedis)
jedis
- bring your own Jedis poolpublic Long del(String key)
key
- the key namepublic Long del(String key, com.tsoft.jenkins.plugin.rejson.Path path)
key
- the key namepath
- optional single path in the object, defaults to rootpublic <T> T get(String key)
key
- the key namepublic <T> T get(String key, com.tsoft.jenkins.plugin.rejson.Path... paths)
key
- the key namepaths
- optional one ore more paths in the objectpublic void set(String key, Object object, JReJSON.ExistenceModifier flag)
key
- the key nameobject
- the Java object to storeflag
- an existential modifierpublic void set(String key, Object object)
key
- the key nameobject
- the Java object to storepublic void set(String key, Object object, com.tsoft.jenkins.plugin.rejson.Path path)
key
- the key nameobject
- the Java object to storepath
- in the objectpublic void set(String key, Object object, JReJSON.ExistenceModifier flag, com.tsoft.jenkins.plugin.rejson.Path path)
key
- the key nameobject
- the Java object to storeflag
- an existential modifierpath
- in the objectpublic Class<?> type(String key)
key
- the key namepublic Class<?> type(String key, com.tsoft.jenkins.plugin.rejson.Path path)
key
- the key namepath
- a path in the object@Deprecated public static Long del(redis.clients.jedis.Jedis conn, String key, com.tsoft.jenkins.plugin.rejson.Path... path)
del(String, Path)
insteadconn
- the Jedis connectionkey
- the key namepath
- optional single path in the object, defaults to root@Deprecated public static Object get(redis.clients.jedis.Jedis conn, String key, com.tsoft.jenkins.plugin.rejson.Path... paths)
get(String, Path...)
insteadconn
- the Jedis connectionkey
- the key namepaths
- optional one ore more paths in the object, defaults to root@Deprecated public static void set(redis.clients.jedis.Jedis conn, String key, Object object, JReJSON.ExistenceModifier flag, com.tsoft.jenkins.plugin.rejson.Path... path)
set(String, Object, ExistenceModifier, Path)
insteadconn
- the Jedis connectionkey
- the key nameobject
- the Java object to storeflag
- an existential modifierpath
- optional single path in the object, defaults to root@Deprecated public static void set(redis.clients.jedis.Jedis conn, String key, Object object, com.tsoft.jenkins.plugin.rejson.Path... path)
set(String, Object, ExistenceModifier, Path)
insteadconn
- the Jedis connectionkey
- the key nameobject
- the Java object to storepath
- optional single path in the object, defaults to root@Deprecated public static Class<?> type(redis.clients.jedis.Jedis conn, String key, com.tsoft.jenkins.plugin.rejson.Path... path)
type(String, Path)
insteadconn
- the Jedis connectionkey
- the key namepath
- optional single path in the object, defaults to rootpublic redis.clients.jedis.Jedis getConnection()
Copyright © 2016–2020. All rights reserved.