Search in sources :

Example 6 with KeyValuePair

use of com.moilioncircle.redis.replicator.rdb.datatype.KeyValuePair in project rocketmq-externals by apache.

the class RedisEventTest method getKeyValuePair.

private KeyValuePair getKeyValuePair() {
    KeyValuePair pair = new KeyStringValueString();
    pair.setKey("key".getBytes());
    pair.setValue("value".getBytes());
    return pair;
}
Also used : KeyValuePair(com.moilioncircle.redis.replicator.rdb.datatype.KeyValuePair) KeyStringValueString(com.moilioncircle.redis.replicator.rdb.datatype.KeyStringValueString)

Example 7 with KeyValuePair

use of com.moilioncircle.redis.replicator.rdb.datatype.KeyValuePair in project rocketmq-externals by apache.

the class ListenerTest method testEventListener.

@Test
public void testEventListener() {
    EventListener eventListener = new RedisEventListener(this.config, processor);
    KeyValuePair pair = new KeyStringValueString();
    eventListener.onEvent(null, pair);
}
Also used : KeyValuePair(com.moilioncircle.redis.replicator.rdb.datatype.KeyValuePair) KeyStringValueString(com.moilioncircle.redis.replicator.rdb.datatype.KeyStringValueString) EventListener(com.moilioncircle.redis.replicator.event.EventListener) RedisEventListener(org.apache.rocketmq.connect.redis.processor.RedisEventListener) RedisEventListener(org.apache.rocketmq.connect.redis.processor.RedisEventListener) Test(org.junit.Test)

Example 8 with KeyValuePair

use of com.moilioncircle.redis.replicator.rdb.datatype.KeyValuePair in project rocketmq-externals by apache.

the class ProcessorTest method getKVCommandPair.

private KeyValuePair getKVCommandPair() {
    KeyValuePair event = new KeyStringValueSet();
    event.setValueRdbType(RDB_TYPE_SET);
    event.setKey("mySet".getBytes());
    Set<byte[]> values = new HashSet<>();
    values.add("myValue".getBytes());
    values.add("myValue2".getBytes());
    event.setValue(values);
    return event;
}
Also used : KeyValuePair(com.moilioncircle.redis.replicator.rdb.datatype.KeyValuePair) KeyStringValueSet(com.moilioncircle.redis.replicator.rdb.datatype.KeyStringValueSet) HashSet(java.util.HashSet)

Example 9 with KeyValuePair

use of com.moilioncircle.redis.replicator.rdb.datatype.KeyValuePair in project rocketmq-externals by apache.

the class ProcessorTest method getKeyValuePair.

private KeyValuePair getKeyValuePair() {
    KeyValuePair pair = new KeyStringValueString();
    pair.setKey("key".getBytes());
    pair.setValue("value".getBytes());
    return pair;
}
Also used : KeyValuePair(com.moilioncircle.redis.replicator.rdb.datatype.KeyValuePair) KeyStringValueString(com.moilioncircle.redis.replicator.rdb.datatype.KeyStringValueString)

Aggregations

KeyValuePair (com.moilioncircle.redis.replicator.rdb.datatype.KeyValuePair)9 KeyStringValueString (com.moilioncircle.redis.replicator.rdb.datatype.KeyStringValueString)7 Test (org.junit.Test)5 Config (org.apache.rocketmq.connect.redis.common.Config)4 EventListener (com.moilioncircle.redis.replicator.event.EventListener)3 RedisEventListener (org.apache.rocketmq.connect.redis.processor.RedisEventListener)3 BatchedKeyValuePair (com.moilioncircle.redis.replicator.rdb.iterable.datatype.BatchedKeyValuePair)2 DefaultRedisEventHandler (org.apache.rocketmq.connect.redis.handler.DefaultRedisEventHandler)2 RedisEventHandler (org.apache.rocketmq.connect.redis.handler.RedisEventHandler)2 KVEntry (org.apache.rocketmq.connect.redis.pojo.KVEntry)2 DefaultRedisEventProcessor (org.apache.rocketmq.connect.redis.processor.DefaultRedisEventProcessor)2 RedisEventProcessor (org.apache.rocketmq.connect.redis.processor.RedisEventProcessor)2 ExceptionListener (com.moilioncircle.redis.replicator.ExceptionListener)1 GetSetCommand (com.moilioncircle.redis.replicator.cmd.impl.GetSetCommand)1 KeyStringValueList (com.moilioncircle.redis.replicator.rdb.datatype.KeyStringValueList)1 KeyStringValueSet (com.moilioncircle.redis.replicator.rdb.datatype.KeyStringValueSet)1 BatchedKeyStringValueString (com.moilioncircle.redis.replicator.rdb.iterable.datatype.BatchedKeyStringValueString)1 HashSet (java.util.HashSet)1 RedisExceptionListener (org.apache.rocketmq.connect.redis.processor.RedisExceptionListener)1