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

com.redis.spring.batch.writer.operation.Del Maven / Gradle / Ivy

The newest version!
package com.redis.spring.batch.writer.operation;

import java.util.function.Function;

import org.springframework.batch.item.Chunk;

import io.lettuce.core.RedisFuture;
import io.lettuce.core.api.async.BaseRedisAsyncCommands;
import io.lettuce.core.api.async.RedisKeyAsyncCommands;

public class Del extends AbstractKeyWriteOperation {

	public Del(Function keyFunction) {
		super(keyFunction);
	}

	@SuppressWarnings({ "unchecked", "rawtypes" })
	@Override
	protected void execute(BaseRedisAsyncCommands commands, T item, K key, Chunk> outputs) {
		outputs.add((RedisFuture) ((RedisKeyAsyncCommands) commands).del(key));
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy