Package redis.clients.jedis

Examples of redis.clients.jedis.Jedis.select()


  public boolean put(final String row, final T value, final long version) throws AvroBaseException {
    try {
      boolean returned = false;
      final Jedis j = pool.getResource();
      try {
        j.select(db);
        Schema schema = value.getSchema();
        String schemaKey = hashCache.get(schema);
        if (schemaKey == null) {
          final String doc = schema.toString();
          schemaKey = createSchemaKey(schema, doc);
View Full Code Here


  public void delete(final String row) throws AvroBaseException {
    try {
      boolean returned = false;
      Jedis j = pool.getResource();
      try {
        j.select(db);
        List<Object> results;
        do {
          results = j.multi(new TransactionBlock() {
            @Override
            public void execute() throws JedisException {
View Full Code Here

        }
        final Jedis jedis = new Jedis(config.getHost(), config.getPort(), config.getTimeout());
        if (config.getPassword() != null) {
            jedis.auth(config.getPassword());
        }
        jedis.select(config.getDatabase());
        return jedis;
    }

    public static void enqueueJobs(final String queue, final List<Job> jobs, final Config config) {
        final Client client = new ClientImpl(config);
View Full Code Here

     
      Jedis jedis = RedisManager.getInstance().getJedis(
          this.host + ":" + this.port);
     
      if (this.db != 0)
        jedis.select(this.db);

      String key = commandParts[1];
      Set<String> members = jedis.smembers(key);
     
      RedisManager.getInstance().returnJedis(this.host + ":" + this.port,
View Full Code Here

    jedis.connect();
    if (null != this.password) {
      jedis.auth(this.password);
    }
    if (database != 0) {
      jedis.select(database);
    }
    if (clientName != null) {
      jedis.clientSetname(clientName);
    }
View Full Code Here

    public void run()
        throws InterruptedException
    {
        Jedis conn = new Jedis("localhost");
        conn.select(15);
        conn.flushDB();

        testCreateUserAndStatus(conn);
        conn.flushDB();
View Full Code Here

            this.args = args;
        }

        public void run() {
            Jedis conn = new Jedis("localhost");
            conn.select(15);

            Object[] args = new Object[this.args.length + 1];
            System.arraycopy(this.args, 0, args, 1, this.args.length);
            args[0] = conn;
View Full Code Here

    public void run()
        throws InterruptedException, IOException
    {
        Jedis conn = new Jedis("localhost");
        conn.select(15);

        testAddUpdateContact(conn);
        testAddressBookAutocomplete(conn);
        testDistributedLocking(conn);
        testCountingSemaphore(conn);
View Full Code Here

        new Chapter07().run();
    }

    public void run(){
        Jedis conn = new Jedis("localhost");
        conn.select(15);
        conn.flushDB();

        testIndexDocument(conn);
        testSetOperations(conn);
        testParseQuery(conn);
View Full Code Here

        new Chapter09().run();
    }

    public void run() {
        Jedis conn = new Jedis("localhost");
        conn.select(15);
        conn.flushDB();

        testLongZiplistPerformance(conn);
        testShardKey(conn);
        testShardedHash(conn);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.