public class UserChannelDaoSnapshot extends UserChannelDao<UserSnapshot,ChannelSnapshot>
Constructor and Description |
---|
UserChannelDaoSnapshot(PircBotX bot,
Locale locale,
UserChannelMapSnapshot mainMap,
EnumMap<UserLevel,UserChannelMap<UserSnapshot,ChannelSnapshot>> levelsMap,
com.google.common.collect.ImmutableMap<String,UserSnapshot> userNickMap,
com.google.common.collect.ImmutableMap<String,ChannelSnapshot> channelNameMap,
com.google.common.collect.ImmutableMap<String,UserSnapshot> privateUsers) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Clears all internal maps
|
ChannelSnapshot |
createChannel(String name)
Creates a known channel, internally called when we join a channel
|
UserChannelDaoSnapshot |
createSnapshot()
Create an immutable snapshot (copy) of all of contained Users, Channels,
and mappings, VERY EXPENSIVE.
|
UserSnapshot |
createUser(UserHostmask userHostmask)
Create a user from a hostmask, internally called when a valid, real user
contacts us
|
UserSnapshot |
getUserBot()
Gets the bots own user object.
|
channelExists, containsChannel, containsUser, containsUser, getAllChannels, getAllUsers, getChannel, getChannels, getChannels, getLevels, getNormalUserChannels, getNormalUsers, getUser, getUser, getUsers, getUsers, userExists
public UserChannelDaoSnapshot(PircBotX bot, Locale locale, UserChannelMapSnapshot mainMap, EnumMap<UserLevel,UserChannelMap<UserSnapshot,ChannelSnapshot>> levelsMap, com.google.common.collect.ImmutableMap<String,UserSnapshot> userNickMap, com.google.common.collect.ImmutableMap<String,ChannelSnapshot> channelNameMap, com.google.common.collect.ImmutableMap<String,UserSnapshot> privateUsers)
public UserChannelDaoSnapshot createSnapshot()
UserChannelDao
createSnapshot
in class UserChannelDao<UserSnapshot,ChannelSnapshot>
public ChannelSnapshot createChannel(String name)
UserChannelDao
createChannel
in class UserChannelDao<UserSnapshot,ChannelSnapshot>
public UserSnapshot createUser(UserHostmask userHostmask)
UserChannelDao
createUser
in class UserChannelDao<UserSnapshot,ChannelSnapshot>
userHostmask
- The hostmask of the userUser
that was createdpublic UserSnapshot getUserBot()
UserChannelDao
getUserBot
in class UserChannelDao<UserSnapshot,ChannelSnapshot>
public void close()
UserChannelDao
close
in interface Closeable
close
in interface AutoCloseable
close
in class UserChannelDao<UserSnapshot,ChannelSnapshot>
Copyright © 2010–2020 Leon Blakey. All rights reserved.