Tabnine Logo
LettuceHashCommands.pipeline
Code IndexAdd Tabnine to your IDE (free)

How to use
pipeline
method
in
org.springframework.data.redis.connection.lettuce.LettuceHashCommands

Best Java code snippets using org.springframework.data.redis.connection.lettuce.LettuceHashCommands.pipeline (Showing top 20 results out of 315)

origin: spring-projects/spring-data-redis

@Override
public Boolean hSet(byte[] key, byte[] field, byte[] value) {
  Assert.notNull(key, "Key must not be null!");
  Assert.notNull(field, "Field must not be null!");
  Assert.notNull(value, "Value must not be null!");
  try {
    if (isPipelined()) {
      pipeline(connection.newLettuceResult(getAsyncConnection().hset(key, field, value)));
      return null;
    }
    if (isQueueing()) {
      transaction(connection.newLettuceResult(getAsyncConnection().hset(key, field, value)));
      return null;
    }
    return getConnection().hset(key, field, value);
  } catch (Exception ex) {
    throw convertLettuceAccessException(ex);
  }
}
origin: spring-projects/spring-data-redis

@Override
public Boolean hSetNX(byte[] key, byte[] field, byte[] value) {
  Assert.notNull(key, "Key must not be null!");
  Assert.notNull(field, "Field must not be null!");
  Assert.notNull(value, "Value must not be null!");
  try {
    if (isPipelined()) {
      pipeline(connection.newLettuceResult(getAsyncConnection().hsetnx(key, field, value)));
      return null;
    }
    if (isQueueing()) {
      transaction(connection.newLettuceResult(getAsyncConnection().hsetnx(key, field, value)));
      return null;
    }
    return getConnection().hsetnx(key, field, value);
  } catch (Exception ex) {
    throw convertLettuceAccessException(ex);
  }
}
origin: spring-projects/spring-data-redis

@Nullable
@Override
public Long hStrLen(byte[] key, byte[] field) {
  Assert.notNull(key, "Key must not be null!");
  Assert.notNull(field, "Field must not be null!");
  try {
    if (isPipelined()) {
      pipeline(connection.newLettuceResult(getAsyncConnection().hstrlen(key, field)));
      return null;
    }
    if (isQueueing()) {
      transaction(connection.newLettuceResult(getAsyncConnection().hstrlen(key, field)));
      return null;
    }
    return getConnection().hstrlen(key, field);
  } catch (Exception ex) {
    throw convertLettuceAccessException(ex);
  }
}
origin: spring-projects/spring-data-redis

@Override
public void hMSet(byte[] key, Map<byte[], byte[]> hashes) {
  Assert.notNull(key, "Key must not be null!");
  Assert.notNull(hashes, "Hashes must not be null!");
  try {
    if (isPipelined()) {
      pipeline(connection.newLettuceStatusResult(getAsyncConnection().hmset(key, hashes)));
      return;
    }
    if (isQueueing()) {
      transaction(connection.newLettuceStatusResult(getAsyncConnection().hmset(key, hashes)));
      return;
    }
    getConnection().hmset(key, hashes);
  } catch (Exception ex) {
    throw convertLettuceAccessException(ex);
  }
}
origin: spring-projects/spring-data-redis

@Override
public Double hIncrBy(byte[] key, byte[] field, double delta) {
  Assert.notNull(key, "Key must not be null!");
  Assert.notNull(field, "Field must not be null!");
  try {
    if (isPipelined()) {
      pipeline(connection.newLettuceResult(getAsyncConnection().hincrbyfloat(key, field, delta)));
      return null;
    }
    if (isQueueing()) {
      transaction(connection.newLettuceResult(getAsyncConnection().hincrbyfloat(key, field, delta)));
      return null;
    }
    return getConnection().hincrbyfloat(key, field, delta);
  } catch (Exception ex) {
    throw convertLettuceAccessException(ex);
  }
}
origin: spring-projects/spring-data-redis

@Override
public Boolean hExists(byte[] key, byte[] field) {
  Assert.notNull(key, "Key must not be null!");
  Assert.notNull(field, "Fields must not be null!");
  try {
    if (isPipelined()) {
      pipeline(connection.newLettuceResult(getAsyncConnection().hexists(key, field)));
      return null;
    }
    if (isQueueing()) {
      transaction(connection.newLettuceResult(getAsyncConnection().hexists(key, field)));
      return null;
    }
    return getConnection().hexists(key, field);
  } catch (Exception ex) {
    throw convertLettuceAccessException(ex);
  }
}
origin: spring-projects/spring-data-redis

@Override
public byte[] hGet(byte[] key, byte[] field) {
  Assert.notNull(key, "Key must not be null!");
  Assert.notNull(field, "Field must not be null!");
  try {
    if (isPipelined()) {
      pipeline(connection.newLettuceResult(getAsyncConnection().hget(key, field)));
      return null;
    }
    if (isQueueing()) {
      transaction(connection.newLettuceResult(getAsyncConnection().hget(key, field)));
      return null;
    }
    return getConnection().hget(key, field);
  } catch (Exception ex) {
    throw convertLettuceAccessException(ex);
  }
}
origin: spring-projects/spring-data-redis

@Override
public Long hDel(byte[] key, byte[]... fields) {
  Assert.notNull(key, "Key must not be null!");
  Assert.notNull(fields, "Fields must not be null!");
  try {
    if (isPipelined()) {
      pipeline(connection.newLettuceResult(getAsyncConnection().hdel(key, fields)));
      return null;
    }
    if (isQueueing()) {
      transaction(connection.newLettuceResult(getAsyncConnection().hdel(key, fields)));
      return null;
    }
    return getConnection().hdel(key, fields);
  } catch (Exception ex) {
    throw convertLettuceAccessException(ex);
  }
}
origin: spring-projects/spring-data-redis

@Override
public Long hIncrBy(byte[] key, byte[] field, long delta) {
  Assert.notNull(key, "Key must not be null!");
  Assert.notNull(field, "Field must not be null!");
  try {
    if (isPipelined()) {
      pipeline(connection.newLettuceResult(getAsyncConnection().hincrby(key, field, delta)));
      return null;
    }
    if (isQueueing()) {
      transaction(connection.newLettuceResult(getAsyncConnection().hincrby(key, field, delta)));
      return null;
    }
    return getConnection().hincrby(key, field, delta);
  } catch (Exception ex) {
    throw convertLettuceAccessException(ex);
  }
}
origin: spring-projects/spring-data-redis

@Override
public Map<byte[], byte[]> hGetAll(byte[] key) {
  Assert.notNull(key, "Key must not be null!");
  try {
    if (isPipelined()) {
      pipeline(connection.newLettuceResult(getAsyncConnection().hgetall(key)));
      return null;
    }
    if (isQueueing()) {
      transaction(connection.newLettuceResult(getAsyncConnection().hgetall(key)));
      return null;
    }
    return getConnection().hgetall(key);
  } catch (Exception ex) {
    throw convertLettuceAccessException(ex);
  }
}
origin: spring-projects/spring-data-redis

@Override
public Long hLen(byte[] key) {
  Assert.notNull(key, "Key must not be null!");
  try {
    if (isPipelined()) {
      pipeline(connection.newLettuceResult(getAsyncConnection().hlen(key)));
      return null;
    }
    if (isQueueing()) {
      transaction(connection.newLettuceResult(getAsyncConnection().hlen(key)));
      return null;
    }
    return getConnection().hlen(key);
  } catch (Exception ex) {
    throw convertLettuceAccessException(ex);
  }
}
origin: spring-projects/spring-data-redis

@Override
public List<byte[]> hVals(byte[] key) {
  Assert.notNull(key, "Key must not be null!");
  try {
    if (isPipelined()) {
      pipeline(connection.newLettuceResult(getAsyncConnection().hvals(key)));
      return null;
    }
    if (isQueueing()) {
      transaction(connection.newLettuceResult(getAsyncConnection().hvals(key)));
      return null;
    }
    return getConnection().hvals(key);
  } catch (Exception ex) {
    throw convertLettuceAccessException(ex);
  }
}
origin: spring-projects/spring-data-redis

@Override
public List<byte[]> hMGet(byte[] key, byte[]... fields) {
  Assert.notNull(key, "Key must not be null!");
  Assert.notNull(fields, "Fields must not be null!");
  try {
    if (isPipelined()) {
      pipeline(connection.newLettuceResult(getAsyncConnection().hmget(key, fields),
          LettuceConverters.keyValueListUnwrapper()));
      return null;
    }
    if (isQueueing()) {
      transaction(connection.newLettuceResult(getAsyncConnection().hmget(key, fields),
          LettuceConverters.keyValueListUnwrapper()));
      return null;
    }
    return LettuceConverters.<byte[], byte[]> keyValueListUnwrapper().convert(getConnection().hmget(key, fields));
  } catch (Exception ex) {
    throw convertLettuceAccessException(ex);
  }
}
origin: spring-projects/spring-data-redis

@Override
public Set<byte[]> hKeys(byte[] key) {
  Assert.notNull(key, "Key must not be null!");
  try {
    if (isPipelined()) {
      pipeline(connection.newLettuceResult(getAsyncConnection().hkeys(key), LettuceConverters.bytesListToBytesSet()));
      return null;
    }
    if (isQueueing()) {
      transaction(
          connection.newLettuceResult(getAsyncConnection().hkeys(key), LettuceConverters.bytesListToBytesSet()));
      return null;
    }
    return LettuceConverters.toBytesSet(getConnection().hkeys(key));
  } catch (Exception ex) {
    throw convertLettuceAccessException(ex);
  }
}
origin: apache/servicemix-bundles

@Override
public Boolean hExists(byte[] key, byte[] field) {
  Assert.notNull(key, "Key must not be null!");
  Assert.notNull(field, "Fields must not be null!");
  try {
    if (isPipelined()) {
      pipeline(connection.newLettuceResult(getAsyncConnection().hexists(key, field)));
      return null;
    }
    if (isQueueing()) {
      transaction(connection.newLettuceResult(getAsyncConnection().hexists(key, field)));
      return null;
    }
    return getConnection().hexists(key, field);
  } catch (Exception ex) {
    throw convertLettuceAccessException(ex);
  }
}
origin: apache/servicemix-bundles

@Override
public void hMSet(byte[] key, Map<byte[], byte[]> hashes) {
  Assert.notNull(key, "Key must not be null!");
  Assert.notNull(hashes, "Hashes must not be null!");
  try {
    if (isPipelined()) {
      pipeline(connection.newLettuceStatusResult(getAsyncConnection().hmset(key, hashes)));
      return;
    }
    if (isQueueing()) {
      transaction(connection.newLettuceStatusResult(getAsyncConnection().hmset(key, hashes)));
      return;
    }
    getConnection().hmset(key, hashes);
  } catch (Exception ex) {
    throw convertLettuceAccessException(ex);
  }
}
origin: org.springframework.data/spring-data-redis

@Override
public Long hLen(byte[] key) {
  Assert.notNull(key, "Key must not be null!");
  try {
    if (isPipelined()) {
      pipeline(connection.newLettuceResult(getAsyncConnection().hlen(key)));
      return null;
    }
    if (isQueueing()) {
      transaction(connection.newLettuceResult(getAsyncConnection().hlen(key)));
      return null;
    }
    return getConnection().hlen(key);
  } catch (Exception ex) {
    throw convertLettuceAccessException(ex);
  }
}
origin: org.springframework.data/spring-data-redis

@Override
public List<byte[]> hVals(byte[] key) {
  Assert.notNull(key, "Key must not be null!");
  try {
    if (isPipelined()) {
      pipeline(connection.newLettuceResult(getAsyncConnection().hvals(key)));
      return null;
    }
    if (isQueueing()) {
      transaction(connection.newLettuceResult(getAsyncConnection().hvals(key)));
      return null;
    }
    return getConnection().hvals(key);
  } catch (Exception ex) {
    throw convertLettuceAccessException(ex);
  }
}
origin: org.springframework.data/spring-data-redis

@Override
public Map<byte[], byte[]> hGetAll(byte[] key) {
  Assert.notNull(key, "Key must not be null!");
  try {
    if (isPipelined()) {
      pipeline(connection.newLettuceResult(getAsyncConnection().hgetall(key)));
      return null;
    }
    if (isQueueing()) {
      transaction(connection.newLettuceResult(getAsyncConnection().hgetall(key)));
      return null;
    }
    return getConnection().hgetall(key);
  } catch (Exception ex) {
    throw convertLettuceAccessException(ex);
  }
}
origin: apache/servicemix-bundles

@Override
public Set<byte[]> hKeys(byte[] key) {
  Assert.notNull(key, "Key must not be null!");
  try {
    if (isPipelined()) {
      pipeline(connection.newLettuceResult(getAsyncConnection().hkeys(key), LettuceConverters.bytesListToBytesSet()));
      return null;
    }
    if (isQueueing()) {
      transaction(
          connection.newLettuceResult(getAsyncConnection().hkeys(key), LettuceConverters.bytesListToBytesSet()));
      return null;
    }
    return LettuceConverters.toBytesSet(getConnection().hkeys(key));
  } catch (Exception ex) {
    throw convertLettuceAccessException(ex);
  }
}
org.springframework.data.redis.connection.lettuceLettuceHashCommandspipeline

Popular methods of LettuceHashCommands

  • <init>
  • convertLettuceAccessException
  • getAsyncConnection
  • getConnection
  • hScan
  • isPipelined
  • isQueueing
  • transaction

Popular in Java

  • Running tasks concurrently on multiple threads
  • getExternalFilesDir (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • onCreateOptionsMenu (Activity)
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now