Example usage for org.springframework.data.redis.support.collections RedisProperties putAll

List of usage examples for org.springframework.data.redis.support.collections RedisProperties putAll

Introduction

In this page you can find the example usage for org.springframework.data.redis.support.collections RedisProperties putAll.

Prototype

@Override
    @SuppressWarnings("unchecked")
    public synchronized void putAll(Map<? extends Object, ? extends Object> t) 

Source Link

Usage

From source file:org.springframework.integration.redis.outbound.RedisCollectionPopulatingMessageHandler.java

private void handleProperties(final RedisProperties properties, Message<?> message) {
    final Object payload = message.getPayload();
    if (this.extractPayloadElements && payload instanceof Properties) {
        this.processInPipeline(new PipelineCallback() {
            public void process() {
                properties.putAll((Properties) payload);
            }//from w  w  w.j a  v a  2s . c o  m
        });
    } else {
        Object key = this.assertMapEntry(message, true);
        properties.put(key, payload);
    }
}

From source file:org.springframework.integration.redis.outbound.RedisStoreWritingMessageHandler.java

private void writeToProperties(final RedisProperties properties, Message<?> message) {
    final Object payload = message.getPayload();
    if (this.extractPayloadElements && payload instanceof Properties) {
        this.processInPipeline(new PipelineCallback() {
            public void process() {
                properties.putAll((Properties) payload);
            }//www  . ja va  2  s.  co m
        });
    } else {
        Assert.isInstanceOf(String.class, payload, "For property, payload must be a String.");
        Object key = this.determineMapKey(message, true);
        properties.put(key, payload);
    }
}