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

com.alibaba.spring.boot.rsocket.broker.route.ServiceRoutingSelector Maven / Gradle / Ivy

There is a newer version: 1.1.6
Show newest version
package com.alibaba.spring.boot.rsocket.broker.route;

import com.alibaba.rsocket.ServiceLocator;
import org.jetbrains.annotations.Nullable;

import java.util.Collection;
import java.util.Set;

/**
 * service routing selector: find handler according to service id
 *
 * @author leijuan
 */
public interface ServiceRoutingSelector {

    void register(Integer instanceId, Set services);

    void register(Integer instanceId, int powerUnit, Set services);

    void deregister(Integer instanceId);

    boolean containInstance(Integer instanceId);

    boolean containService(Integer serviceId);

    @Nullable
    ServiceLocator findServiceById(Integer serviceId);

    @Nullable
    Integer findHandler(Integer serviceId);

    Collection findHandlers(Integer serviceId);

    Integer getInstanceCount(Integer serviceId);

    Integer getInstanceCount(String serviceName);

    Collection findAllServices();

    int getDistinctServiceCount();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy