public class MongodbLabelSetFactory extends AbstractLabelSetFactory implements cn.weforward.common.GcCleanable
| 限定符和类型 | 字段和说明 |
|---|---|
protected com.mongodb.client.MongoClient |
m_Clients
mongo客户端
|
protected int |
m_HashSize
hash集合的大小
|
protected String |
m_NamePrefix
名称前缀
|
protected String |
m_ServerId
服务器id
|
| 构造器和说明 |
|---|
MongodbLabelSetFactory(String url)
构造
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected <E extends LabelElement> |
doCreateLabelSet(String name,
cn.weforward.protocol.ext.ObjectMapper<E> mapper) |
void |
onGcCleanup(int policy) |
void |
setHashSize(int size) |
void |
setNamePrefix(String prefix)
设置lableset的名称前缀
|
void |
setServerId(String sid)
设置服务器id
|
createLabelSet, getLabelSet, iteratorclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorprotected com.mongodb.client.MongoClient m_Clients
protected String m_ServerId
protected int m_HashSize
protected String m_NamePrefix
public MongodbLabelSetFactory(String url)
url - 数据库链接public void setServerId(String sid)
sid - 服务器idpublic void setHashSize(int size)
size - hash集合的大小public void setNamePrefix(String prefix)
prefix - 名称前缀protected <E extends LabelElement> LabelSet<E> doCreateLabelSet(String name, cn.weforward.protocol.ext.ObjectMapper<E> mapper)
doCreateLabelSet 在类中 AbstractLabelSetFactorypublic void onGcCleanup(int policy)
onGcCleanup 在接口中 cn.weforward.common.GcCleanableCopyright © 2022. All rights reserved.