
org.redisson.api.RObjectReactive Maven / Gradle / Ivy
/**
* Copyright 2016 Nikita Koksharov
*
* 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 org.redisson.api;
import org.reactivestreams.Publisher;
import org.redisson.client.codec.Codec;
/**
* Base interface for all Redisson objects
*
* @author Nikita Koksharov
*
*/
public interface RObjectReactive {
String getName();
Codec getCodec();
/**
* Transfer a object from a source Redis instance to a destination Redis instance
* in mode
*
* @param host - destination host
* @param port - destination port
* @param database - destination database
* @return void
*/
Publisher migrate(String host, int port, int database);
/**
* Move object to another database in mode
*
* @param database - number of Redis database
* @return true
if key was moved false
if not
*/
Publisher move(int database);
/**
* Delete object in mode
*
* @return true
if object was deleted false
if not
*/
Publisher delete();
/**
* Rename current object key to newName
* in mode
*
* @param newName - new name of object
* @return void
*/
Publisher rename(String newName);
/**
* Rename current object key to newName
* in mode only if new key is not exists
*
* @param newName - new name of object
* @return true
if object has been renamed successfully and false
otherwise
*/
Publisher renamenx(String newName);
/**
* Check object existence
*
* @return true
if object exists and false
otherwise
*/
Publisher isExists();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy