Class ConsistencyChecks
- Author:
- Guus der Kinderen, guus@goodbytes.nl
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongenerateReportForMucRooms
(Cache<String, MUCRoom> clusteredRoomCacheInput, Map<String, MUCRoom> localRoomsInput, Map<NodeID, Set<OccupantManager.Occupant>> occupantsByNodeInput, Map<OccupantManager.Occupant, NodeID> nodeByOccupantInput, Set<OccupantManager.Occupant> federatedOccupantsInput, String mucServiceName) generateReportForRoutingTableClientRoutes
(Cache<String, ClientRoute> usersCache, Collection<LocalClientSession> localClientRoutes, Map<NodeID, Set<String>> routeOwnersByClusterNode) Verifies that usersCache, #localClientRoutingTable and routeOwnersByClusterNode ofRoutingTableImpl
are in a consistent state.generateReportForRoutingTableComponentRoutes
(Cache<String, HashSet<NodeID>> componentsCache, Collection<RoutableChannelHandler> localComponentRoutes, HashMap<NodeID, Set<String>> componentsByClusterNode) Verifies that #componentsCache, #localComponentRoutingTable and #componentsByClusterNode ofRoutingTableImpl
are in a consistent state.generateReportForRoutingTableServerRoutes
(Cache<DomainPair, NodeID> serversCache, Collection<LocalOutgoingServerSession> localServerRoutes, HashMap<NodeID, Set<DomainPair>> s2sDomainPairsByClusterNode) Verifies that #serversCache, #localServerRoutingTable and #s2sDomainPairsByClusterNode ofRoutingTableImpl
are in a consistent state.generateReportForSessionManagerIncomingServerSessions
(Cache<StreamID, IncomingServerSessionInfo> incomingServerSessionsCache, Collection<LocalIncomingServerSession> localIncomingServerSessions, Map<NodeID, Set<StreamID>> incomingServerSessionsByClusterNode) Verifies that #incomingServerSessionsCache, #localIncomingServerSessions and #incomingServerSessionsByClusterNode ofSessionManager
are in a consistent state.generateReportForSessionManagerSessionInfos
(Cache<String, ClientSessionInfo> sessionInfoCache, Collection<ClientSession> localSessions, Map<NodeID, Set<String>> sessionInfoKeysByClusterNode) Verifies that #sessionInfoCache, #localSessionInfos and #sessionInfoKeysByClusterNode ofSessionManager
are in a consistent state.generateReportForUserSessions
(Cache<String, HashSet<String>> usersSessionsCache, Cache<String, ClientRoute> usersCache)
-
Constructor Details
-
ConsistencyChecks
public ConsistencyChecks()
-
-
Method Details
-
generateReportForRoutingTableServerRoutes
public static com.google.common.collect.Multimap<String,String> generateReportForRoutingTableServerRoutes(@Nonnull Cache<DomainPair, NodeID> serversCache, @Nonnull Collection<LocalOutgoingServerSession> localServerRoutes, @Nonnull HashMap<NodeID, Set<DomainPair>> s2sDomainPairsByClusterNode) Verifies that #serversCache, #localServerRoutingTable and #s2sDomainPairsByClusterNode ofRoutingTableImpl
are in a consistent state.Note that this operation can be costly in terms of resource usage. Use with caution in large / busy systems.
The returned multi-map can contain up to four keys: info, fail, pass, data. All entry values are a human readable description of a checked characteristic. When the state is consistent, no 'fail' entries will be returned.
- Parameters:
serversCache
- The cache that is used to share data across cluster nodeslocalServerRoutes
- The data structure that keeps track of what data was added to the cache by the local cluster node.s2sDomainPairsByClusterNode
- The data structure that keeps track of what data was added to the cache by the remote cluster nodes.- Returns:
- A consistency state report.
-
generateReportForRoutingTableComponentRoutes
public static com.google.common.collect.Multimap<String,String> generateReportForRoutingTableComponentRoutes(@Nonnull Cache<String, HashSet<NodeID>> componentsCache, @Nonnull Collection<RoutableChannelHandler> localComponentRoutes, @Nonnull HashMap<NodeID, Set<String>> componentsByClusterNode) Verifies that #componentsCache, #localComponentRoutingTable and #componentsByClusterNode ofRoutingTableImpl
are in a consistent state.Note that this operation can be costly in terms of resource usage. Use with caution in large / busy systems.
The returned multi-map can contain up to four keys: info, fail, pass, data. All entry values are a human readable description of a checked characteristic. When the state is consistent, no 'fail' entries will be returned.
- Parameters:
componentsCache
- The cache that is used to share data across cluster nodeslocalComponentRoutes
- The data structure that keeps track of what data was added to the cache by the local cluster node.componentsByClusterNode
- The data structure that keeps track of what data was added to the cache by the remote cluster nodes.- Returns:
- A consistency state report.
-
generateReportForRoutingTableClientRoutes
public static com.google.common.collect.Multimap<String,String> generateReportForRoutingTableClientRoutes(@Nonnull Cache<String, ClientRoute> usersCache, @Nonnull Collection<LocalClientSession> localClientRoutes, @Nonnull Map<NodeID, Set<String>> routeOwnersByClusterNode) Verifies that usersCache, #localClientRoutingTable and routeOwnersByClusterNode ofRoutingTableImpl
are in a consistent state.Note that this operation can be costly in terms of resource usage. Use with caution in large / busy systems.
The returned multi-map can contain up to four keys: info, fail, pass, data. All entry values are a human readable description of a checked characteristic. When the state is consistent, no 'fail' entries will be returned.
- Parameters:
usersCache
- The cache that is used to share data across cluster nodeslocalClientRoutes
- The data structure that keeps track of what data was added to the cache by the local cluster node.routeOwnersByClusterNode
- The data structure that keeps track of what data was added to the cache by the remote cluster nodes.- Returns:
- A consistency state report.
-
generateReportForSessionManagerIncomingServerSessions
public static com.google.common.collect.Multimap<String,String> generateReportForSessionManagerIncomingServerSessions(@Nonnull Cache<StreamID, IncomingServerSessionInfo> incomingServerSessionsCache, @Nonnull Collection<LocalIncomingServerSession> localIncomingServerSessions, @Nonnull Map<NodeID, Set<StreamID>> incomingServerSessionsByClusterNode) Verifies that #incomingServerSessionsCache, #localIncomingServerSessions and #incomingServerSessionsByClusterNode ofSessionManager
are in a consistent state.Note that this operation can be costly in terms of resource usage. Use with caution in large / busy systems.
The returned multi-map can contain up to four keys: info, fail, pass, data. All entry values are a human readable description of a checked characteristic. When the state is consistent, no 'fail' entries will be returned.
- Parameters:
incomingServerSessionsCache
- The cache that is used to share data across cluster nodeslocalIncomingServerSessions
- The data structure that keeps track of what data was added to the cache by the local cluster node.incomingServerSessionsByClusterNode
- The data structure that keeps track of what data was added to the cache by the remote cluster nodes.- Returns:
- A consistency state report.
-
generateReportForSessionManagerSessionInfos
public static com.google.common.collect.Multimap<String,String> generateReportForSessionManagerSessionInfos(@Nonnull Cache<String, ClientSessionInfo> sessionInfoCache, @Nonnull Collection<ClientSession> localSessions, @Nonnull Map<NodeID, Set<String>> sessionInfoKeysByClusterNode) Verifies that #sessionInfoCache, #localSessionInfos and #sessionInfoKeysByClusterNode ofSessionManager
are in a consistent state.Note that this operation can be costly in terms of resource usage. Use with caution in large / busy systems.
The returned multi-map can contain up to four keys: info, fail, pass, data. All entry values are a human readable description of a checked characteristic. When the state is consistent, no 'fail' entries will be returned.
- Parameters:
sessionInfoCache
- The cache that is used to share data across cluster nodes. (note that unlike its siblings, this is empty when not clustering!)localSessions
- The data structure that keeps track of what data was added to the cache by the local cluster node.sessionInfoKeysByClusterNode
- The data structure that keeps track of what data was added to the cache by the remote cluster nodes.- Returns:
- A consistency state report.
-
generateReportForUserSessions
-
generateReportForMucRooms
public static com.google.common.collect.Multimap<String,String> generateReportForMucRooms(@Nonnull Cache<String, MUCRoom> clusteredRoomCacheInput, @Nonnull Map<String, MUCRoom> localRoomsInput, @Nonnull Map<NodeID, Set<OccupantManager.Occupant>> occupantsByNodeInput, @Nonnull Map<OccupantManager.Occupant, NodeID> nodeByOccupantInput, @Nonnull Set<OccupantManager.Occupant> federatedOccupantsInput, @Nonnull String mucServiceName)
-