BiodbRequestSchedulerRule | R Documentation |
Scheduler rule class.
Scheduler rule class.
This class represents a rule for the request scheduler.
new()
Initializer.
BiodbRequestSchedulerRule$new(host, conn = NULL)
host
The web host for which this rules is applicable.
conn
The connector instance that is concerned by this rule.
Nothing.
getHost()
Gets host.
BiodbRequestSchedulerRule$getHost()
Returns the host.
getN()
Gets N value. The number of connections allowed during a period of T seconds.
BiodbRequestSchedulerRule$getN()
Returns N as an integer.
getT()
Gets T value. The number of seconds during which N connections are allowed.
BiodbRequestSchedulerRule$getT()
Returns T as a numeric.
setFrequency()
Sets both N and T.
BiodbRequestSchedulerRule$setFrequency(n, t)
n
The number of connections allowed during a period of t seconds, as an integer.
t
The number of seconds during which n connections are allowed, as a numeric value.
Nothing.
getConnectors()
Gets connectors associaated with this rule.
BiodbRequestSchedulerRule$getConnectors()
A list of BiodbConn objects.
addConnector()
Associate a connector with this rule.
BiodbRequestSchedulerRule$addConnector(conn)
conn
A BiodbConn object.
Nothing.
removeConnector()
Disassociate a connector from this rule.
BiodbRequestSchedulerRule$removeConnector(conn)
conn
A BiodbConn instance.
Nothing.
print()
Displays information about this instance.
BiodbRequestSchedulerRule$print()
Nothing.
waitAsNeeded()
Wait (sleep) until a new request is allowed.
BiodbRequestSchedulerRule$waitAsNeeded()
Nothing.
recomputeFrequency()
Recompute frequency from submitted N and T values.
BiodbRequestSchedulerRule$recomputeFrequency()
Nothing.
computeSleepTime()
Compute the needed sleep time to wait until a new request is allowed, starting from the submitted time.
BiodbRequestSchedulerRule$computeSleepTime(cur.time = Sys.time())
cur.time
Time from which to compute needed sleep time.
The needed sleep time in seconds.
storeCurrentTime()
Stores the current time.
BiodbRequestSchedulerRule$storeCurrentTime(cur.time = Sys.time())
cur.time
The current time.
Nothing.
clone()
The objects of this class are cloneable with this method.
BiodbRequestSchedulerRule$clone(deep = FALSE)
deep
Whether to make a deep clone.
BiodbRequestScheduler
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.