public class DNSCacheManager extends ConfigTestElement implements TestIterationListener, Serializable, org.apache.http.conn.DnsResolver
DNSCachePanel, either system or
custom resolver can be used. Custom resolver uses dnsjava library, and gives
ability to bypass both OS and JVM cache. It allows to use paradigm
"1 virtual user - 1 DNS cache" in performance tests.| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEFAULT_CLEAR_CACHE_EACH_ITER |
PASSWORD, USERNAMECOMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS| Constructor and Description |
|---|
DNSCacheManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
addHost(String dnsHost,
String addresses)
Add static host
|
void |
addServer(String dnsServer)
Add DNS Server
|
void |
clear()
Clear the TestElement of all data.
|
Object |
clone() |
CollectionProperty |
getHosts() |
CollectionProperty |
getServers() |
boolean |
isClearEachIteration()
Clean DNS cache each iteration
|
boolean |
isCustomResolver() |
InetAddress[] |
resolve(String host)
Resolves address using system or custom DNS resolver
|
void |
setClearEachIteration(boolean clear)
Clean DNS cache each iteration
|
void |
setCustomResolver(boolean isCustomResolver) |
void |
testIterationStart(LoopIterationEvent event)
Each time through a Thread Group's test script, an iteration event is
fired for each thread.
|
addConfigElement, addTestElement, expectsModificationaddPropertiesValues, addProperty, addProperty, canRemove, clearTemporary, clearTestElementChildren, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traversePropertyfinalize, getClass, notify, notifyAll, toString, wait, wait, waitremovedpublic static final boolean DEFAULT_CLEAR_CACHE_EACH_ITER
public Object clone()
clone in interface ConfigElementclone in interface TestElementclone in class AbstractTestElementpublic InetAddress[] resolve(String host) throws UnknownHostException
resolve in interface org.apache.http.conn.DnsResolverUnknownHostExceptionpublic void testIterationStart(LoopIterationEvent event)
testIterationStart in interface TestIterationListenerevent - the iteration eventpublic void clear()
clear in interface TestElementclear in class AbstractTestElementpublic void addServer(String dnsServer)
dnsServer - DNS Serverpublic CollectionProperty getServers()
public void addHost(String dnsHost, String addresses)
dnsHost - DNS hostaddresses - Comma separated list of addressespublic CollectionProperty getHosts()
public boolean isClearEachIteration()
public void setClearEachIteration(boolean clear)
clear - flag whether DNS cache should be cleared on each iterationpublic boolean isCustomResolver()
public void setCustomResolver(boolean isCustomResolver)
Copyright © 1998-2019 Apache Software Foundation. All Rights Reserved.