All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.lambdaworks.redis.output.ValueSetOutput Maven / Gradle / Ivy

There is a newer version: 2.3.3
Show newest version
// Copyright (C) 2011 - Will Glozer.  All rights reserved.

package com.lambdaworks.redis.output;

import com.lambdaworks.redis.codec.RedisCodec;
import com.lambdaworks.redis.protocol.CommandOutput;

import java.nio.ByteBuffer;
import java.util.HashSet;
import java.util.Set;

/**
 * {@link Set} of value output.
 *
 * @param  Value type.
 *
 * @author Will Glozer
 */
public class ValueSetOutput extends CommandOutput> {
    public ValueSetOutput(RedisCodec codec) {
        super(codec, new HashSet());
    }

    @Override
    public void set(ByteBuffer bytes) {
        output.add(bytes == null ? null : codec.decodeValue(bytes));
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy