Java Code Examples for io.openmessaging.KeyValue#getInt()

The following examples show how to use io.openmessaging.KeyValue#getInt() . 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: LocalMessageCache.java    From rocketmq with Apache License 2.0 5 votes vote down vote up
MessageExt poll(final KeyValue properties) {
    int currentPollTimeout = clientConfig.getOperationTimeout();
    if (properties.containsKey(Message.BuiltinKeys.TIMEOUT)) {
        currentPollTimeout = properties.getInt(Message.BuiltinKeys.TIMEOUT);
    }
    return poll(currentPollTimeout);
}
 
Example 2
Source File: LocalMessageCache.java    From DDMQ with Apache License 2.0 5 votes vote down vote up
MessageExt poll(final KeyValue properties) {
    int currentPollTimeout = clientConfig.getOmsOperationTimeout();
    if (properties.containsKey(PropertyKeys.OPERATION_TIMEOUT)) {
        currentPollTimeout = properties.getInt(PropertyKeys.OPERATION_TIMEOUT);
    }
    return poll(currentPollTimeout);
}
 
Example 3
Source File: LocalMessageCache.java    From rocketmq-4.3.0 with Apache License 2.0 5 votes vote down vote up
MessageExt poll(final KeyValue properties) {
    int currentPollTimeout = clientConfig.getOperationTimeout();
    if (properties.containsKey(Message.BuiltinKeys.TIMEOUT)) {
        currentPollTimeout = properties.getInt(Message.BuiltinKeys.TIMEOUT);
    }
    return poll(currentPollTimeout);
}
 
Example 4
Source File: LocalMessageCache.java    From rocketmq-all-4.1.0-incubating with Apache License 2.0 5 votes vote down vote up
MessageExt poll(final KeyValue properties) {
    int currentPollTimeout = clientConfig.getOmsOperationTimeout();
    if (properties.containsKey(PropertyKeys.OPERATION_TIMEOUT)) {
        currentPollTimeout = properties.getInt(PropertyKeys.OPERATION_TIMEOUT);
    }
    return poll(currentPollTimeout);
}
 
Example 5
Source File: LocalMessageCache.java    From rocketmq-read with Apache License 2.0 5 votes vote down vote up
MessageExt poll(final KeyValue properties) {
    int currentPollTimeout = clientConfig.getOperationTimeout();
    if (properties.containsKey(Message.BuiltinKeys.TIMEOUT)) {
        currentPollTimeout = properties.getInt(Message.BuiltinKeys.TIMEOUT);
    }
    return poll(currentPollTimeout);
}
 
Example 6
Source File: LocalMessageCache.java    From DDMQ with Apache License 2.0 5 votes vote down vote up
MessageExt poll(final KeyValue properties) {
    int currentPollTimeout = clientConfig.getOmsOperationTimeout();
    if (properties.containsKey(PropertyKeys.OPERATION_TIMEOUT)) {
        currentPollTimeout = properties.getInt(PropertyKeys.OPERATION_TIMEOUT);
    }
    return poll(currentPollTimeout);
}
 
Example 7
Source File: KeyValueHelper.java    From joyqueue with Apache License 2.0 4 votes vote down vote up
public static int getInt(KeyValue keyValue, String key, int defaultValue) {
    if (!keyValue.containsKey(key)) {
        return defaultValue;
    }
    return keyValue.getInt(key);
}
 
Example 8
Source File: ProducerImpl.java    From rocketmq with Apache License 2.0 4 votes vote down vote up
@Override
public Promise<SendResult> sendAsync(final Message message, final KeyValue properties) {
    long timeout = properties.containsKey(Message.BuiltinKeys.TIMEOUT)
        ? properties.getInt(Message.BuiltinKeys.TIMEOUT) : this.rocketmqProducer.getSendMsgTimeout();
    return sendAsync(message, timeout);
}
 
Example 9
Source File: ProducerImpl.java    From rocketmq with Apache License 2.0 4 votes vote down vote up
@Override
public SendResult send(final Message message, final KeyValue properties) {
    long timeout = properties.containsKey(Message.BuiltinKeys.TIMEOUT)
        ? properties.getInt(Message.BuiltinKeys.TIMEOUT) : this.rocketmqProducer.getSendMsgTimeout();
    return send(message, timeout);
}
 
Example 10
Source File: ProducerImpl.java    From rocketmq-all-4.1.0-incubating with Apache License 2.0 4 votes vote down vote up
@Override
public Promise<SendResult> sendAsync(final Message message, final KeyValue properties) {
    long timeout = properties.containsKey(PropertyKeys.OPERATION_TIMEOUT)
        ? properties.getInt(PropertyKeys.OPERATION_TIMEOUT) : this.rocketmqProducer.getSendMsgTimeout();
    return sendAsync(message, timeout);
}
 
Example 11
Source File: ProducerImpl.java    From rocketmq-all-4.1.0-incubating with Apache License 2.0 4 votes vote down vote up
@Override
public SendResult send(final Message message, final KeyValue properties) {
    long timeout = properties.containsKey(PropertyKeys.OPERATION_TIMEOUT)
        ? properties.getInt(PropertyKeys.OPERATION_TIMEOUT) : this.rocketmqProducer.getSendMsgTimeout();
    return send(message, timeout);
}
 
Example 12
Source File: ProducerImpl.java    From DDMQ with Apache License 2.0 4 votes vote down vote up
@Override
public Promise<SendResult> sendAsync(final Message message, final KeyValue properties) {
    long timeout = properties.containsKey(PropertyKeys.OPERATION_TIMEOUT)
        ? properties.getInt(PropertyKeys.OPERATION_TIMEOUT) : this.rocketmqProducer.getSendMsgTimeout();
    return sendAsync(message, timeout);
}
 
Example 13
Source File: ProducerImpl.java    From DDMQ with Apache License 2.0 4 votes vote down vote up
@Override
public SendResult send(final Message message, final KeyValue properties) {
    long timeout = properties.containsKey(PropertyKeys.OPERATION_TIMEOUT)
        ? properties.getInt(PropertyKeys.OPERATION_TIMEOUT) : this.rocketmqProducer.getSendMsgTimeout();
    return send(message, timeout);
}
 
Example 14
Source File: ProducerImpl.java    From DDMQ with Apache License 2.0 4 votes vote down vote up
@Override
public SendResult send(final Message message, final KeyValue properties) {
    long timeout = properties.containsKey(PropertyKeys.OPERATION_TIMEOUT)
        ? properties.getInt(PropertyKeys.OPERATION_TIMEOUT) : this.rocketmqProducer.getSendMsgTimeout();
    return send(message, timeout);
}
 
Example 15
Source File: ProducerImpl.java    From rocketmq-read with Apache License 2.0 4 votes vote down vote up
@Override
public Promise<SendResult> sendAsync(final Message message, final KeyValue properties) {
    long timeout = properties.containsKey(Message.BuiltinKeys.TIMEOUT)
        ? properties.getInt(Message.BuiltinKeys.TIMEOUT) : this.rocketmqProducer.getSendMsgTimeout();
    return sendAsync(message, timeout);
}
 
Example 16
Source File: ProducerImpl.java    From rocketmq-read with Apache License 2.0 4 votes vote down vote up
@Override
public SendResult send(final Message message, final KeyValue properties) {
    long timeout = properties.containsKey(Message.BuiltinKeys.TIMEOUT)
        ? properties.getInt(Message.BuiltinKeys.TIMEOUT) : this.rocketmqProducer.getSendMsgTimeout();
    return send(message, timeout);
}
 
Example 17
Source File: ProducerImpl.java    From rocketmq-4.3.0 with Apache License 2.0 4 votes vote down vote up
@Override
public Promise<SendResult> sendAsync(final Message message, final KeyValue properties) {
    long timeout = properties.containsKey(Message.BuiltinKeys.TIMEOUT)
        ? properties.getInt(Message.BuiltinKeys.TIMEOUT) : this.rocketmqProducer.getSendMsgTimeout();
    return sendAsync(message, timeout);
}
 
Example 18
Source File: ProducerImpl.java    From rocketmq-4.3.0 with Apache License 2.0 4 votes vote down vote up
@Override
public SendResult send(final Message message, final KeyValue properties) {
    long timeout = properties.containsKey(Message.BuiltinKeys.TIMEOUT)
        ? properties.getInt(Message.BuiltinKeys.TIMEOUT) : this.rocketmqProducer.getSendMsgTimeout();
    return send(message, timeout);
}
 
Example 19
Source File: ProducerImpl.java    From DDMQ with Apache License 2.0 4 votes vote down vote up
@Override
public Promise<SendResult> sendAsync(final Message message, final KeyValue properties) {
    long timeout = properties.containsKey(PropertyKeys.OPERATION_TIMEOUT)
        ? properties.getInt(PropertyKeys.OPERATION_TIMEOUT) : this.rocketmqProducer.getSendMsgTimeout();
    return sendAsync(message, timeout);
}