本文整理了Java中org.xbill.DNS.Lookup.getDefaultCache()
方法的一些代码示例,展示了Lookup.getDefaultCache()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Lookup.getDefaultCache()
方法的具体详情如下:
包路径:org.xbill.DNS.Lookup
类名称:Lookup
方法名:getDefaultCache
暂无
代码示例来源:origin: internetarchive/heritrix3
public void start() {
// cache AlertThreadGroup for later ToePool launch
AlertThreadGroup atg = AlertThreadGroup.current();
if(atg!=null) {
alertThreadGroup = atg;
}
if(isRunning) {
return;
}
sExit = CrawlStatus.FINISHED_ABNORMAL;
// force creation of DNS Cache now -- avoids CacheCleaner in toe-threads group
// also cap size at 1 (we never wanta cached value; 0 is non-operative)
Lookup.getDefaultCache(DClass.IN).setMaxEntries(1);
reserveMemory = new LinkedList<byte[]>();
for(int i = 0; i < RESERVE_BLOCKS; i++) {
reserveMemory.add(new byte[RESERVE_BLOCK_SIZE]);
}
isRunning = true;
}
代码示例来源:origin: internetarchive/heritrix3
Lookup.getDefaultCache(DClass.IN).clearCache();
代码示例来源:origin: org.archive.heritrix/heritrix-engine
public void start() {
// cache AlertThreadGroup for later ToePool launch
AlertThreadGroup atg = AlertThreadGroup.current();
if(atg!=null) {
alertThreadGroup = atg;
}
if(isRunning) {
return;
}
sExit = CrawlStatus.FINISHED_ABNORMAL;
// force creation of DNS Cache now -- avoids CacheCleaner in toe-threads group
// also cap size at 1 (we never wanta cached value; 0 is non-operative)
Lookup.getDefaultCache(DClass.IN).setMaxEntries(1);
reserveMemory = new LinkedList<byte[]>();
for(int i = 0; i < RESERVE_BLOCKS; i++) {
reserveMemory.add(new byte[RESERVE_BLOCK_SIZE]);
}
isRunning = true;
}
代码示例来源:origin: org.archive.heritrix/heritrix-engine
Lookup.getDefaultCache(DClass.IN).clearCache();
代码示例来源:origin: net.sf.dnsjava-osgi/dnsjava-osgi
this.resolver = getDefaultResolver();
this.searchPath = getDefaultSearchPath();
this.cache = getDefaultCache(dclass);
代码示例来源:origin: dnsjava/dnsjava
this.resolver = getDefaultResolver();
this.searchPath = getDefaultSearchPath();
this.cache = getDefaultCache(dclass);
代码示例来源:origin: org.littleshoot/dnsjava
this.resolver = getDefaultResolver();
this.searchPath = getDefaultSearchPath();
this.cache = getDefaultCache(dclass);
代码示例来源:origin: tiandawu/IotXmpp
this.resolver = getDefaultResolver();
this.searchPath = getDefaultSearchPath();
this.cache = getDefaultCache(dclass);
代码示例来源:origin: apache/james-project
@Before
public void setUp() throws Exception {
dnsServer = new TestableDNSServer();
DefaultConfigurationBuilder db = new DefaultConfigurationBuilder();
db.load(new ByteArrayInputStream(DNS_SERVER_CONFIG));
dnsServer.configure(db);
dnsServer.init();
defaultCache = Lookup.getDefaultCache(DClass.IN);
defaultResolver = Lookup.getDefaultResolver();
defaultSearchPaths = Lookup.getDefaultSearchPath();
Lookup.setDefaultCache(null, DClass.IN);
Lookup.setDefaultResolver(null);
Lookup.setDefaultSearchPath(new Name[]{});
dnsServer.setResolver(null);
mockedCache = mock(Cache.class);
}
代码示例来源:origin: org.apache.james/james-server-dnsservice-dnsjava
@Before
public void setUp() throws Exception {
dnsServer = new TestableDNSServer();
DefaultConfigurationBuilder db = new DefaultConfigurationBuilder();
db.load(new ByteArrayInputStream(DNS_SERVER_CONFIG));
dnsServer.configure(db);
dnsServer.init();
defaultCache = Lookup.getDefaultCache(DClass.IN);
defaultResolver = Lookup.getDefaultResolver();
defaultSearchPaths = Lookup.getDefaultSearchPath();
Lookup.setDefaultCache(null, DClass.IN);
Lookup.setDefaultResolver(null);
Lookup.setDefaultSearchPath(new Name[]{});
dnsServer.setResolver(null);
mockedCache = mock(Cache.class);
}
内容来源于网络,如有侵权,请联系作者删除!