|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.sparql.benchmarking.options.OptionsImpl
public class OptionsImpl
Implementation of generic options
| Field Summary |
|---|
| Fields inherited from interface net.sf.sparql.benchmarking.options.Options |
|---|
DEFAULT_FORMAT_ASK, DEFAULT_FORMAT_GRAPH, DEFAULT_FORMAT_SELECT, DEFAULT_HALT_BEHAVIOUR, DEFAULT_LIMIT, DEFAULT_MAX_DELAY, DEFAULT_PARALLEL_THREADS, DEFAULT_SANITY_CHECKS, DEFAULT_TIMEOUT |
| Constructor Summary | |
|---|---|
OptionsImpl()
|
|
| Method Summary | ||
|---|---|---|
void |
addListener(ProgressListener listener)
Adds a Progress Listener if it is not already registered |
|
|
copy()
Makes a copy of the options |
|
protected void |
copyStandardOptions(OptionsImpl copy)
Copies standard options across from this instance |
|
boolean |
getAllowCompression()
Gets whether the client will allow the server to return Deflate/GZip compressed responses |
|
HttpAuthenticator |
getAuthenticator()
Gets the HTTP authenticator in use |
|
String |
getCustomEndpoint(String name)
Gets a custom endpoint |
|
Map<String,String> |
getCustomEndpoints()
Gets an unmodifiable copy of the defined custom endpoints |
|
Map<String,Object> |
getCustomSettings()
Gets a map that may be used to get/set custom settings |
|
Dataset |
getDataset()
Gets a dataset that is used for in-memory queries and updates |
|
ExecutorService |
getExecutor()
Gets the in-use executor for running queries and query mixes in threads using the Java concurrent framework |
|
long |
getGlobalOrder()
Gets the Global Run Order |
|
String |
getGraphStoreEndpoint()
Gets the SPARQL graph store protocol endpoint that is in use |
|
boolean |
getHaltAny()
Gets Halt on Any behavior |
|
HaltBehaviour |
getHaltBehaviour()
Gets the Halting Behaviour |
|
boolean |
getHaltOnError()
Gets the Halt on Error behavior |
|
boolean |
getHaltOnTimeout()
Gets the Halt on Timeout behavior |
|
long |
getLimit()
Gets the LIMIT to impose on queries |
|
List<ProgressListener> |
getListeners()
Gets the Progress Listeners registered |
|
int |
getMaxDelay()
Gets the maximum delay between operations |
|
OperationMixRunner |
getMixRunner()
Gets the operation mix runner to use, if null is returned then
the default DefaultOperationMixRunner should be used |
|
boolean |
getNoCount()
Gets whether query results are counted or just thrown away |
|
OperationMix |
getOperationMix()
Gets the Query Mix that is used |
|
OperationRunner |
getOperationRunner()
Gets the operation runner to use, if null is returned then the
default OperationRunner should be used |
|
int |
getParallelThreads()
Gets the number of parallel threads used for testing |
|
String |
getQueryEndpoint()
Gets the SPARQL query endpoint that is in use |
|
boolean |
getRandomizeOrder()
Gets whether operation order should be randomized |
|
String |
getResultsAskFormat()
Gets the Results format used for operations that make ASK queries |
|
String |
getResultsGraphFormat()
Gets the Results format used for operations that make CONSTRUCT/DESCRIBE queries or that retrieve RDF graphs |
|
String |
getResultsSelectFormat()
Gets the Results format used for operations that make SELECT queries |
|
int |
getSanityCheckLevel()
Gets the Sanity Checking Level |
|
OperationMix |
getSetupMix()
Gets the setup mix to be run, null indicates no setup mix is
requested. |
|
OperationMix |
getTeardownMix()
Gets the tear down mix to be run, null indicates no tear down mix
is requested. |
|
int |
getTimeout()
Gets the timeout for operations, a zero/negative value indicates no timeout |
|
String |
getUpdateEndpoint()
Gets the SPARQL Update endpoint that is in use |
|
void |
removeListener(ProgressListener listener)
Removes a Progress Listener if it is registered |
|
void |
resetGlobalOrder()
Resets the global run order |
|
void |
setAllowCompression(boolean allowed)
Sets whether the client will allow the server to return Deflate/GZip compressed responses |
|
void |
setAuthenticator(HttpAuthenticator authenticator)
Sets the HTTP authenticator used |
|
void |
setCustomEndpoint(String name,
String endpoint)
Sets a custom defined endpoint |
|
void |
setDataset(Dataset dataset)
Sets a dataset to be used for in-memory queries and updates |
|
void |
setGraphStoreEndpoint(String endpoint)
Gets the SPARQL graph store protocol endpoint that is in use |
|
void |
setHaltAny(boolean halt)
Sets Halt on Any behavior, if set to true sets Halt on Error and Halt on Timeout to true as well |
|
void |
setHaltBehaviour(HaltBehaviour behaviour)
Sets the Halting Behaviour |
|
void |
setHaltOnError(boolean halt)
Sets the Halt on Error behavior |
|
void |
setHaltOnTimeout(boolean halt)
Sets the Halt on Timeout behavior |
|
void |
setLimit(long limit)
Sets the LIMIT to impose on queries |
|
void |
setMaxDelay(int milliseconds)
Sets the maximum delay between operations |
|
void |
setMixRunner(OperationMixRunner runner)
Sets the operation mix runner to use, if set to null then the
default DefaultOperationMixRunner should be used |
|
void |
setNoCount(boolean noCount)
Sets whether query results are counted or just thrown away |
|
void |
setOperationMix(OperationMix queries)
Sets the Query Mix to use |
|
void |
setOperationRunner(OperationRunner runner)
Sets the operation runner to use, if set to null then the default
DefaultOperationRunner should be used |
|
void |
setParallelThreads(int threads)
Sets the number of parallel threads used for testing |
|
void |
setQueryEndpoint(String endpoint)
Sets the SPARQL query endpoint to be used |
|
void |
setRandomizeOrder(boolean randomize)
Sets whether operation order should be randomized |
|
void |
setResultsAskFormat(String contentType)
Sets the Results format to be used for operations that make ASK queries |
|
void |
setResultsGraphFormat(String contentType)
Sets the Results format used for operations that CONSTRUCT/DESCRIBE queries or that retrieve RDF graphs |
|
void |
setResultsSelectFormat(String contentType)
Sets the Results format to be used for operations that make SELECT queries |
|
void |
setSanityCheckLevel(int level)
Sets the Sanity Checking level |
|
void |
setSetupMix(OperationMix mix)
Sets the setup mix that will be run once before testing starts. |
|
void |
setTeardownMix(OperationMix mix)
Sets the tear down mix that will be run once after testing completes successfully. |
|
void |
setTimeout(int timeout)
Sets the timeout for operations, a zero/negative value indicates no timeout |
|
void |
setUpdateEndpoint(String endpoint)
Sets the SPARQL update endpoint that is in use |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OptionsImpl()
| Method Detail |
|---|
public void addListener(ProgressListener listener)
Options
addListener in interface Optionslistener - Progress Listenerpublic <T extends Options> T copy()
OptionsWhile this is guaranteed to take a copy of primitive typed properties there is no guarantee that it takes a copy of reference types so changing some properties will still affect the original options. This method is primarily intended for use in cases where you need to tweak an option without interfering with other consumers of the options which is particularly relevant when running multi-threaded testing.
copy in interface Optionsprotected final void copyStandardOptions(OptionsImpl copy)
Primarily intended for use by derived implementations which extend the basic options to make it easier for them to create copies of themselves.
copy - Copy to copy topublic boolean getAllowCompression()
Options
getAllowCompression in interface Optionspublic HttpAuthenticator getAuthenticator()
Options
getAuthenticator in interface Optionspublic String getCustomEndpoint(String name)
Options
getCustomEndpoint in interface Optionsname - Endpoint name
public Map<String,String> getCustomEndpoints()
Options
Custom endpoints are a more specific form of the
Options.getCustomSettings() and provide a slightly more user friendly
and type safe interface when the custom setting to be defined has a
string value.
getCustomEndpoints in interface Optionspublic Map<String,Object> getCustomSettings()
Options
This is provided so custom operations may be created that can share state
or that need custom settings to be provided and can't modify/extend the
standard Options interface since they want to run with existing
standard runners.
getCustomSettings in interface Optionspublic Dataset getDataset()
Options
getDataset in interface Optionspublic ExecutorService getExecutor()
Options
getExecutor in interface Optionspublic long getGlobalOrder()
OptionsCalled elsewhere so that mix runs and operation runs record what order they were run in
getGlobalOrder in interface Optionspublic String getGraphStoreEndpoint()
Options
getGraphStoreEndpoint in interface Optionspublic boolean getHaltAny()
Options
getHaltAny in interface Optionspublic HaltBehaviour getHaltBehaviour()
Options
getHaltBehaviour in interface Optionspublic boolean getHaltOnError()
Options
getHaltOnError in interface Optionspublic boolean getHaltOnTimeout()
Options
getHaltOnTimeout in interface Optionspublic long getLimit()
Options
getLimit in interface Optionspublic List<ProgressListener> getListeners()
Options
getListeners in interface Optionspublic int getMaxDelay()
Options
getMaxDelay in interface Optionspublic OperationMixRunner getMixRunner()
Optionsnull is returned then
the default DefaultOperationMixRunner should be used
getMixRunner in interface Optionspublic boolean getNoCount()
Options
getNoCount in interface Optionspublic OperationMix getOperationMix()
Options
getOperationMix in interface Optionspublic OperationRunner getOperationRunner()
Optionsnull is returned then the
default OperationRunner should be used
getOperationRunner in interface Optionspublic int getParallelThreads()
Options
getParallelThreads in interface Optionspublic String getQueryEndpoint()
Options
getQueryEndpoint in interface Optionspublic boolean getRandomizeOrder()
Options
getRandomizeOrder in interface Optionspublic String getResultsAskFormat()
Options
getResultsAskFormat in interface Optionspublic String getResultsGraphFormat()
Options
getResultsGraphFormat in interface Optionspublic String getResultsSelectFormat()
Options
getResultsSelectFormat in interface Optionspublic int getSanityCheckLevel()
Options
getSanityCheckLevel in interface Optionspublic OperationMix getSetupMix()
Optionsnull indicates no setup mix is
requested.
Operations in a setup mix are guaranteed to be run exactly in the order given. >
getSetupMix in interface Optionspublic OperationMix getTeardownMix()
Optionsnull indicates no tear down mix
is requested.
Operations in a tear down mix are guaranteed to be run exactly in the order given.
getTeardownMix in interface Optionspublic int getTimeout()
Options
getTimeout in interface Optionspublic String getUpdateEndpoint()
Options
getUpdateEndpoint in interface Optionspublic void removeListener(ProgressListener listener)
Options
removeListener in interface Optionslistener - Progress Listenerpublic void resetGlobalOrder()
OptionsUseful for runners that incorporate warmups into their runs
resetGlobalOrder in interface Optionspublic void setAllowCompression(boolean allowed)
Options
setAllowCompression in interface Optionsallowed - Whether Deflate/GZip compression is allowedpublic void setAuthenticator(HttpAuthenticator authenticator)
Options
setAuthenticator in interface Optionsauthenticator - HTTP authenticator
public void setCustomEndpoint(String name,
String endpoint)
Options
setCustomEndpoint in interface Optionsname - Nameendpoint - Endpoint URIpublic void setDataset(Dataset dataset)
Options
setDataset in interface Optionsdataset - Datasetpublic void setGraphStoreEndpoint(String endpoint)
Options
setGraphStoreEndpoint in interface Optionspublic void setHaltAny(boolean halt)
Options
setHaltAny in interface Optionshalt - Whether any issue should cause benchmarking to abortpublic void setHaltBehaviour(HaltBehaviour behaviour)
Options
setHaltBehaviour in interface Optionsbehaviour - Halting Behaviourpublic void setHaltOnError(boolean halt)
Options
setHaltOnError in interface Optionshalt - Whether an error should cause benchmarking to abortpublic void setHaltOnTimeout(boolean halt)
Options
setHaltOnTimeout in interface Optionshalt - Whether a timeout should cause benchmarking to abortpublic void setLimit(long limit)
OptionsValues less than or equal to zero mean existing limits are left unchanged, non-zero values will be imposed iff existing limit is greater than the set limit
setLimit in interface Optionslimit - Limit to imposepublic void setMaxDelay(int milliseconds)
Options
setMaxDelay in interface Optionsmilliseconds - Maximum Delay in millisecondspublic void setMixRunner(OperationMixRunner runner)
Optionsnull then the
default DefaultOperationMixRunner should be used
setMixRunner in interface Optionsrunner - Operation mix runnerpublic void setNoCount(boolean noCount)
OptionsCurrently enabling this only applies to SELECT queries as only SELECT queries stream the results currently, future versions of this tool will also stream CONSTRUCT/DESCRIBE results but this is yet to be implemented
setNoCount in interface OptionsnoCount - Whether query results are countedpublic void setOperationMix(OperationMix queries)
Options
setOperationMix in interface Optionsqueries - Query Mixpublic void setOperationRunner(OperationRunner runner)
Optionsnull then the default
DefaultOperationRunner should be used
setOperationRunner in interface Optionsrunner - Operation runnerpublic void setParallelThreads(int threads)
Options
setParallelThreads in interface Optionsthreads - Number of Parallel Threadspublic void setQueryEndpoint(String endpoint)
Options
setQueryEndpoint in interface Optionsendpoint - SPARQL query endpoint URIpublic void setRandomizeOrder(boolean randomize)
Options
setRandomizeOrder in interface Optionsrandomize - Whether operation order should be randompublic void setResultsAskFormat(String contentType)
Options
setResultsAskFormat in interface OptionscontentType - MIME Type for ASK resultspublic void setResultsGraphFormat(String contentType)
Options
setResultsGraphFormat in interface OptionscontentType - MIME Type for CONSTRUCT/DESCRIBE results and RDF graphspublic void setResultsSelectFormat(String contentType)
Options
setResultsSelectFormat in interface OptionscontentType - MIME Type for SELECT resultspublic void setSanityCheckLevel(int level)
Options
setSanityCheckLevel in interface Optionslevel - Sanity Check Levelpublic void setSetupMix(OperationMix mix)
OptionsOperations in a setup mix are guaranteed to be run exactly in the order given. >
setSetupMix in interface Optionsmix - Setup mixpublic void setTeardownMix(OperationMix mix)
OptionsOperations in a tear down mix are guaranteed to be run exactly in the order given.
setTeardownMix in interface Optionsmix - Tear down mixpublic void setTimeout(int timeout)
Options
setTimeout in interface Optionstimeout - Timeout in secondspublic void setUpdateEndpoint(String endpoint)
Options
setUpdateEndpoint in interface Optionsendpoint - SPARQL update endpoint URI
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||