redis.clients.jedis.BuilderFactory Java Examples

The following examples show how to use redis.clients.jedis.BuilderFactory. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: JedisqueBuilder.java    From jedisque with MIT License 6 votes vote down vote up
@SuppressWarnings("unchecked")
public JobInfo build(Object data) {
	if (null == data) {
		return null;
	}
	List<byte[]> showRaw = (List<byte[]>) data;
	
	return new JobInfo(SafeEncoder.encode(showRaw.get(1)), 
			SafeEncoder.encode(showRaw.get(3)),
			SafeEncoder.encode(showRaw.get(5)), 
			BuilderFactory.LONG.build(showRaw.get(7)), 
			BuilderFactory.LONG.build(showRaw.get(9)),
			BuilderFactory.LONG.build(showRaw.get(11)),
			BuilderFactory.LONG.build(showRaw.get(13)), 
			BuilderFactory.LONG.build(showRaw.get(15)), 
			BuilderFactory.STRING_LIST.build(showRaw.get(17)), 
			BuilderFactory.STRING_LIST.build(showRaw.get(19)),
			BuilderFactory.LONG.build(showRaw.get(21)),
			BuilderFactory.LONG.build(showRaw.get(23)), 
			SafeEncoder.encode(showRaw.get(25)));
}
 
Example #2
Source File: RedisGraphTransaction.java    From JRedisGraph with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * Deletes the entire graph, in multi/exec context
 * @param graphId graph to delete
 * @return response with the deletion running time statistics
 */
public Response<String> deleteGraph(String graphId){

    client.sendCommand(RedisGraphCommand.DELETE, graphId);
    Response<String> response =  getResponse(BuilderFactory.STRING);
    caches.removeGraphCache(graphId);
    return response;
}
 
Example #3
Source File: BuilderFactoryTest.java    From cachecloud with Apache License 2.0 4 votes vote down vote up
@Test
public void buildDouble() {
  Double build = BuilderFactory.DOUBLE.build("1.0".getBytes());
  assertEquals(new Double(1.0), build);
}