Java 类com.hazelcast.core.QueueStore 实例源码

项目:iticrawler    文件:DistQueueConfig.java   
public DistQueueConfig setup(Config cfg, String name, QueueStore<URLInfo> storeImplementation)
{

    QueueConfig qConfig = new QueueConfig();

    //TODO: Refactor the configuration entries
    qConfig.setName(name);
    qConfig.setBackupCount(1);

    if(storeImplementation != null)
    {
           QueueStoreConfig storeConfig = new QueueStoreConfig();
        storeConfig.setStoreImplementation(storeImplementation);
           storeConfig.setProperty("memory-limit", "30");
           qConfig.setQueueStoreConfig(storeConfig);
        //todo Refactor to Config

    }
    cfg.addQueueConfig(qConfig);


    return this;
}