Base interface for MQ management
| 28 | * Base interface for MQ management |
| 29 | */ |
| 30 | public interface MQAdmin { |
| 31 | /** |
| 32 | * Creates a topic |
| 33 | * @param key accessKey |
| 34 | * @param newTopic topic name |
| 35 | * @param queueNum topic's queue number |
| 36 | * @param attributes |
| 37 | */ |
| 38 | void createTopic(final String key, final String newTopic, final int queueNum, Map<String, String> attributes) |
| 39 | throws MQClientException; |
| 40 | |
| 41 | /** |
| 42 | * Creates a topic |
| 43 | * @param key accessKey |
| 44 | * @param newTopic topic name |
| 45 | * @param queueNum topic's queue number |
| 46 | * @param topicSysFlag topic system flag |
| 47 | * @param attributes |
| 48 | */ |
| 49 | void createTopic(String key, String newTopic, int queueNum, int topicSysFlag, Map<String, String> attributes) |
| 50 | throws MQClientException; |
| 51 | |
| 52 | /** |
| 53 | * Gets the message queue offset according to some time in milliseconds<br> |
| 54 | * be cautious to call because of more IO overhead |
| 55 | * |
| 56 | * @param mq Instance of MessageQueue |
| 57 | * @param timestamp from when in milliseconds. |
| 58 | * @return offset |
| 59 | */ |
| 60 | long searchOffset(final MessageQueue mq, final long timestamp) throws MQClientException; |
| 61 | |
| 62 | /** |
| 63 | * Gets the max offset |
| 64 | * |
| 65 | * @param mq Instance of MessageQueue |
| 66 | * @return the max offset |
| 67 | */ |
| 68 | long maxOffset(final MessageQueue mq) throws MQClientException; |
| 69 | |
| 70 | /** |
| 71 | * Gets the minimum offset |
| 72 | * |
| 73 | * @param mq Instance of MessageQueue |
| 74 | * @return the minimum offset |
| 75 | */ |
| 76 | long minOffset(final MessageQueue mq) throws MQClientException; |
| 77 | |
| 78 | /** |
| 79 | * Gets the earliest stored message time |
| 80 | * |
| 81 | * @param mq Instance of MessageQueue |
| 82 | * @return the time in microseconds |
| 83 | */ |
| 84 | long earliestMsgStoreTime(final MessageQueue mq) throws MQClientException; |
| 85 | |
| 86 | /** |
| 87 | * Query messages |
no outgoing calls
no test coverage detected