public class Groups extends Object
| Constructor and Description |
|---|
Groups() |
| Modifier and Type | Method and Description |
|---|---|
void |
bind(String groupId,
ChannelContext channelContext)
和组绑定
|
void |
bind(String groupId,
ChannelContext channelContext,
boolean callbackListener)
和组绑定
|
Set<ChannelContext> |
clients(TioConfig tioConfig,
String groupId)
一个组有哪些客户端
|
Comparator<ChannelContext> |
getChannelContextComparator() |
Set<String> |
groups(ChannelContext channelContext)
某个客户端在哪些组中
|
void |
setChannelContextComparator(Comparator<ChannelContext> channelContextComparator) |
int |
size() |
void |
unbind(ChannelContext channelContext)
与所有组解除绑定
|
void |
unbind(ChannelContext channelContext,
boolean callbackListener) |
void |
unbind(String groupId,
ChannelContext channelContext)
与指定组解除绑定
|
void |
unbind(String groupId,
ChannelContext channelContext,
boolean deleteFromChannelContext)
与指定组解除绑定
|
void |
unbind(String groupId,
ChannelContext channelContext,
boolean deleteFromChannelContext,
boolean callbackListener) |
public void bind(String groupId, ChannelContext channelContext)
groupId - groupIdchannelContext - ChannelContextpublic void bind(String groupId, ChannelContext channelContext, boolean callbackListener)
groupId - groupIdchannelContext - ChannelContextcallbackListener - 是否回调GroupListenerpublic Set<ChannelContext> clients(TioConfig tioConfig, String groupId)
tioConfig - TioConfiggroupId - groupIdpublic int size()
public Set<String> groups(ChannelContext channelContext)
channelContext - channelContextpublic void unbind(ChannelContext channelContext)
channelContext - ChannelContextpublic void unbind(ChannelContext channelContext, boolean callbackListener)
channelContext - ChannelContextcallbackListener - 是否回调GroupListenerpublic void unbind(String groupId, ChannelContext channelContext)
groupId - groupIdchannelContext - ChannelContextpublic void unbind(String groupId, ChannelContext channelContext, boolean deleteFromChannelContext)
groupId - groupIdchannelContext - ChannelContextdeleteFromChannelContext - deleteFromChannelContextpublic void unbind(String groupId, ChannelContext channelContext, boolean deleteFromChannelContext, boolean callbackListener)
groupId - groupIdchannelContext - ChannelContextdeleteFromChannelContext - deleteFromChannelContextcallbackListener - 是否回调GroupListenerpublic Comparator<ChannelContext> getChannelContextComparator()
public void setChannelContextComparator(Comparator<ChannelContext> channelContextComparator)
Copyright © 2025. All rights reserved.