RPUSH myqueue 123
Jedis jedis = new Jedis("localhost");
jedis.rpush("myqueue","123");
BLPOP myqueue
Jedis jedis = new Jedis("localhost");
List<String> mykeys = jedis.blpop("myqueue");
<Context path="" docBase="/usr/local/tomcat/mywebapps/myapplication">
<WatchedResource>WEB-INF/web.xml</WatchedResource>
</Context>
long: The long data type is a 64-bit two's complement integer. The signed long has a minimum value of -2**63 and a maximum value of 2**63-1. In Java SE 8 and later, you can use the long data type to represent an unsigned 64-bit long, which has a minimum value of 0 and a maximum value of 2**64-1. Use this data type when you need a range of values wider than those provided by int. The Long class also contains methods like compareUnsigned, divideUnsigned etc to support arithmetic operations for unsigned long.
String query = "{\n" +
" \"query\": { \"match_all\": {}\n" +
" }" +
"}\n" +
"\n" +
"";
Response response = client.performRequest("GET","/offers_v1/offer/_search", new Hashtable<>(),
new StringEntity(query));
HttpEntity entity = response.getEntity();
ObjectMapper ob = new ObjectMapper()
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
ResponseHits responseHits = ob.readValue(entity.getContent(), ResponseHits.class);
List<Hit> hits = responseHits.getHits().getHits();
return Results.html("index").put("hits", hits);
public class ResponseHits {
private Hits hits;
}
public class Hits {
private List<Hit> hits;
}
public class Hit {
@JsonProperty(value = "_index")
private String index;
@JsonProperty(value = "_type")
private String type;
@JsonProperty(value = "_id")
private String id;
@JsonProperty(value = "_score")
private Double score;
@JsonProperty(value = "_source")
private Hashtable<String, Object> source;
}