package chat.module;
|
|
import chat.module.entity.ChatRoom;
|
import chat.user.User;
|
|
public class ChatroomBucket extends Bucket<ChatRoom> {
|
|
private static ChatroomBucket instance;
|
|
private ChatroomBucket() {
|
|
}
|
|
public static synchronized ChatroomBucket getInstance() {
|
if (instance == null) {
|
instance = new ChatroomBucket();
|
}
|
|
return instance;
|
}
|
|
// public ChatRoom createOne(String name, User sender) {
|
// ChatRoom chatroom = new ChatRoom(name, sender);
|
// String key = chatroom.getId();
|
//
|
// addOne(key, chatroom);
|
//
|
// return chatroom;
|
// }
|
|
|
|
}
|