public class KestrelThriftClient extends Object implements Kestrel.Iface
Constructor and Description |
---|
KestrelThriftClient(String hostname,
int port) |
Modifier and Type | Method and Description |
---|---|
int |
abort(String queue_name,
Set<Long> ids) |
void |
close() |
int |
confirm(String queue_name,
Set<Long> ids) |
void |
delete_queue(String queue_name) |
void |
flush_all_queues() |
void |
flush_queue(String queue_name) |
String |
get_version() |
List<Item> |
get(String queue_name,
int max_items,
int timeout_msec,
int auto_abort_msec) |
QueueInfo |
peek(String queue_name) |
int |
put(String queue_name,
List<ByteBuffer> items,
int expiration_msec) |
void |
put(String queue_name,
String item,
int expiration_msec) |
public KestrelThriftClient(String hostname, int port) throws org.apache.thrift7.TException
org.apache.thrift7.TException
public void close()
public QueueInfo peek(String queue_name) throws org.apache.thrift7.TException
peek
in interface Kestrel.Iface
org.apache.thrift7.TException
public void delete_queue(String queue_name) throws org.apache.thrift7.TException
delete_queue
in interface Kestrel.Iface
org.apache.thrift7.TException
public String get_version() throws org.apache.thrift7.TException
get_version
in interface Kestrel.Iface
org.apache.thrift7.TException
public int put(String queue_name, List<ByteBuffer> items, int expiration_msec) throws org.apache.thrift7.TException
put
in interface Kestrel.Iface
org.apache.thrift7.TException
public void put(String queue_name, String item, int expiration_msec) throws org.apache.thrift7.TException
org.apache.thrift7.TException
public List<Item> get(String queue_name, int max_items, int timeout_msec, int auto_abort_msec) throws org.apache.thrift7.TException
get
in interface Kestrel.Iface
org.apache.thrift7.TException
public int confirm(String queue_name, Set<Long> ids) throws org.apache.thrift7.TException
confirm
in interface Kestrel.Iface
org.apache.thrift7.TException
public int abort(String queue_name, Set<Long> ids) throws org.apache.thrift7.TException
abort
in interface Kestrel.Iface
org.apache.thrift7.TException
public void flush_queue(String queue_name) throws org.apache.thrift7.TException
flush_queue
in interface Kestrel.Iface
org.apache.thrift7.TException
public void flush_all_queues() throws org.apache.thrift7.TException
flush_all_queues
in interface Kestrel.Iface
org.apache.thrift7.TException