__init__(self,
beginCB,
stripeCB,
totalCB,
completeCB,
arg)
(Constructor)
Initialize an instance of the GridFTP Throughput plugin.
This function will initialize the Throughput plugin-specific
instance data for this plugin, and will make the plugin usable for ftp
client handle attribute and handle creation.
-
- Parameters:
beginCB -
The callback to be called upon the start of the transfer. It
has the following signature
'function(arg, handle, srcUrl, destUrl)' where arg is the
argument passed into this call, handle is a SWIG'ized pointer to
a ftp client handle object, srcUrl is the a string representing
the source url, destUrl is the a string representing the
destination url.
stripeCB -
The callback to be called with every performance callback that
is received by the perf plugin. The first callback for each
stripe_ndx will have an instantaneous_throughput based from the
time the command was sent. It has the following signature
'function(arg, handle, stripe_ndx, bytes,
instantaneous_throughput, avg_throughput)' where arg is the
argument passed into this call, handle is a SWIG'ized pointer to
a ftp client handle object, stripe_ndx an int representing which
stripe the data was received on, bytes the total number of bytes
received on this stripe, instantaneous_throughput is a float
representing instanteous throughput on this stripe (bytes / sec),
avg_throughput is a float representing average throughput on this
stripe (bytes / sec)
totalCB -
The callback will be called with every performance callback
that is received by the perf plugin. The first callback for will
have an instantaneous_throughput based from the time the command
was sent. This callback will be called after the per_stripe_cb.
It has the following signature
'function(arg, handle, bytes, instantaneous_throughput,
avg_throughput)' where arg is the argument passed into this call,
handle is a SWIG'ized pointer to a ftp client handle object,
bytes the total number of bytes received on this stripe,
instantaneous_throughput is a float representing instanteous
throughput on this stripe (bytes / sec), avg_throughput is a
float representing average throughput on this stripe (bytes /
sec)
completeCB -
The callback to be called to indicate transfer completion. It
has the following signature
'function(arg, handle, success)' where arg is the argument
passed into this call, handle is a SWIG'ized pointer to a ftp
client handle object, success is an int representing whether the
transfer completed successfully
arg -
An arbitary argument to be passed to all the callbacks.
- Raises:
PluginException -
A PluginException is thrown if unable
to init the plugin.
- Overrides:
pyGlobus.ftpClientPlugin.Plugin.__init__
|