类 SessionGroups
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.concurrent.ConcurrentHashMap<String,Sessions>
-
- xin.alum.aio.groups.SessionGroups
-
- 所有已实现的接口:
Serializable,ConcurrentMap<String,Sessions>,Map<String,Sessions>
@Component public class SessionGroups extends ConcurrentHashMap<String,Sessions>
群组Sesions 管理通道- 作者:
- alum(alum @ live.cn)
- 另请参阅:
- 序列化表格
-
-
嵌套类概要
-
从类继承的嵌套类/接口 java.util.concurrent.ConcurrentHashMap
ConcurrentHashMap.KeySetView<K extends Object,V extends Object>
-
从类继承的嵌套类/接口 java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
构造器概要
构造器 构造器 说明 SessionGroups(ClusterProperties clusterProperties)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 io.netty.channel.group.ChannelGroupFutureall(Transportable msg)向所有连接发送消息【非集群】voidalls(Transportable msg)向所有连接发送消息【集群】Sessionsbind(io.netty.channel.Channel ch, String key)将用户连接绑定到群组Sessionsexit(String userId, String key)用户退出群组Sessionsget(String key)获取群组Sessionsvoidsends(String groupKey, Transportable msg)向集群指定群组推送通知voidunbind(io.netty.channel.Channel ch, String key)解绑群组连接-
从类继承的方法 java.util.concurrent.ConcurrentHashMap
clear, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, forEach, forEach, forEachEntry, forEachEntry, forEachKey, forEachKey, forEachValue, forEachValue, get, getOrDefault, hashCode, isEmpty, keys, keySet, keySet, mappingCount, merge, newKeySet, newKeySet, put, putAll, putIfAbsent, reduce, reduceEntries, reduceEntries, reduceEntriesToDouble, reduceEntriesToInt, reduceEntriesToLong, reduceKeys, reduceKeys, reduceKeysToDouble, reduceKeysToInt, reduceKeysToLong, reduceToDouble, reduceToInt, reduceToLong, reduceValues, reduceValues, reduceValuesToDouble, reduceValuesToInt, reduceValuesToLong, remove, remove, replace, replace, replaceAll, search, searchEntries, searchKeys, searchValues, size, toString, values
-
从类继承的方法 java.util.AbstractMap
clone
-
-
-
-
构造器详细资料
-
SessionGroups
public SessionGroups(ClusterProperties clusterProperties)
-
-
方法详细资料
-
bind
public Sessions bind(io.netty.channel.Channel ch, String key)
将用户连接绑定到群组- 参数:
ch- 通道key- 组键值
-
unbind
public void unbind(io.netty.channel.Channel ch, String key)解绑群组连接- 参数:
ch-key-
-
alls
public void alls(Transportable msg)
向所有连接发送消息【集群】- 参数:
msg- 发送消息
-
all
public io.netty.channel.group.ChannelGroupFuture all(Transportable msg)
向所有连接发送消息【非集群】- 参数:
msg- 发送消息- 返回:
-
sends
public void sends(String groupKey, Transportable msg)
向集群指定群组推送通知- 参数:
groupKey-msg-
-
-