
com.lambdaworks.redis.api.sync.RedisServerCommands Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lettuce Show documentation
Show all versions of lettuce Show documentation
Advanced and thread-safe Java Redis client for synchronous, asynchronous, and
reactive usage. Supports Cluster, Sentinel, Pipelining, Auto-Reconnect, Codecs
and much more.
The newest version!
/*
* Copyright 2011-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.lambdaworks.redis.api.sync;
import java.util.Date;
import java.util.List;
import com.lambdaworks.redis.KillArgs;
import com.lambdaworks.redis.protocol.CommandType;
/**
* Synchronous executed commands for Server Control.
*
* @param Key type.
* @param Value type.
* @author Mark Paluch
* @since 4.0
* @generated by com.lambdaworks.apigenerator.CreateSyncApi
*/
public interface RedisServerCommands {
/**
* Asynchronously rewrite the append-only file.
*
* @return String simple-string-reply always {@code OK}.
*/
String bgrewriteaof();
/**
* Asynchronously save the dataset to disk.
*
* @return String simple-string-reply
*/
String bgsave();
/**
* Get the current connection name.
*
* @return K bulk-string-reply The connection name, or a null bulk reply if no name is set.
*/
K clientGetname();
/**
* Set the current connection name.
*
* @param name the client name
* @return simple-string-reply {@code OK} if the connection name was successfully set.
*/
String clientSetname(K name);
/**
* Kill the connection of a client identified by ip:port.
*
* @param addr ip:port
* @return String simple-string-reply {@code OK} if the connection exists and has been closed
*/
String clientKill(String addr);
/**
* Kill connections of clients which are filtered by {@code killArgs}
*
* @param killArgs args for the kill operation
* @return Long integer-reply number of killed connections
*/
Long clientKill(KillArgs killArgs);
/**
* Stop processing commands from clients for some time.
*
* @param timeout the timeout value in milliseconds
* @return String simple-string-reply The command returns OK or an error if the timeout is invalid.
*/
String clientPause(long timeout);
/**
* Get the list of client connections.
*
* @return String bulk-string-reply a unique string, formatted as follows: One client connection per line (separated by LF),
* each line is composed of a succession of property=value fields separated by a space character.
*/
String clientList();
/**
* Returns an array reply of details about all Redis commands.
*
* @return List<Object> array-reply
*/
List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy