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 String |
CLEAR_CACHE_EACH_ITER |
static boolean |
DEFAULT_CLEAR_CACHE_EACH_ITER |
static boolean |
DEFAULT_IS_CUSTOM_RESOLVER |
static String |
DEFAULT_SERVERS |
static String |
IS_CUSTOM_RESOLVER |
static String |
SERVERS |
PASSWORD, USERNAME
COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS
Constructor and Description |
---|
DNSCacheManager() |
Modifier and Type | Method and Description |
---|---|
void |
addServer(String dnsServer) |
void |
clear()
Clear the TestElement of all data.
|
Object |
clone() |
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, expectsModification
addPropertiesValues, 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, traverseProperty
public static final String CLEAR_CACHE_EACH_ITER
public static final String SERVERS
public static final String IS_CUSTOM_RESOLVER
public static final boolean DEFAULT_CLEAR_CACHE_EACH_ITER
public static final String DEFAULT_SERVERS
public static final boolean DEFAULT_IS_CUSTOM_RESOLVER
public Object clone()
clone
in interface ConfigElement
clone
in interface TestElement
clone
in class AbstractTestElement
public InetAddress[] resolve(String host) throws UnknownHostException
resolve
in interface org.apache.http.conn.DnsResolver
UnknownHostException
public void testIterationStart(LoopIterationEvent event)
testIterationStart
in interface TestIterationListener
event
- the iteration eventpublic void clear()
clear
in interface TestElement
clear
in class AbstractTestElement
public void addServer(String dnsServer)
public CollectionProperty getServers()
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-2016 Apache Software Foundation. All Rights Reserved.