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.TExceptionpublic void close()
public QueueInfo peek(String queue_name) throws org.apache.thrift7.TException
peek in interface Kestrel.Ifaceorg.apache.thrift7.TExceptionpublic void delete_queue(String queue_name) throws org.apache.thrift7.TException
delete_queue in interface Kestrel.Ifaceorg.apache.thrift7.TExceptionpublic String get_version() throws org.apache.thrift7.TException
get_version in interface Kestrel.Ifaceorg.apache.thrift7.TExceptionpublic int put(String queue_name, List<ByteBuffer> items, int expiration_msec) throws org.apache.thrift7.TException
put in interface Kestrel.Ifaceorg.apache.thrift7.TExceptionpublic void put(String queue_name, String item, int expiration_msec) throws org.apache.thrift7.TException
org.apache.thrift7.TExceptionpublic 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.Ifaceorg.apache.thrift7.TExceptionpublic int confirm(String queue_name, Set<Long> ids) throws org.apache.thrift7.TException
confirm in interface Kestrel.Ifaceorg.apache.thrift7.TExceptionpublic int abort(String queue_name, Set<Long> ids) throws org.apache.thrift7.TException
abort in interface Kestrel.Ifaceorg.apache.thrift7.TExceptionpublic void flush_queue(String queue_name) throws org.apache.thrift7.TException
flush_queue in interface Kestrel.Ifaceorg.apache.thrift7.TExceptionpublic void flush_all_queues() throws org.apache.thrift7.TException
flush_all_queues in interface Kestrel.Ifaceorg.apache.thrift7.TException