globus_ftp_client_perf_plugin_set_copy_destroy (3) - Linux Manuals
NAME
Performance Marker Plugin -
Macros
#define GLOBUS_FTP_CLIENT_PERF_PLUGIN_MODULE (&globus_i_ftp_client_perf_plugin_module)
Typedefs
typedef void(* globus_ftp_client_perf_plugin_begin_cb_t )(void *user_specific, globus_ftp_client_handle_t *handle, const char *source_url, const char *dest_url, globus_bool_t restart)
typedef void(* globus_ftp_client_perf_plugin_marker_cb_t )(void *user_specific, globus_ftp_client_handle_t *handle, long time_stamp_int, char time_stamp_tength, int stripe_ndx, int num_stripes, globus_off_t nbytes)
typedef void(* globus_ftp_client_perf_plugin_complete_cb_t )(void *user_specific, globus_ftp_client_handle_t *handle, globus_bool_t success)
typedef void *(* globus_ftp_client_perf_plugin_user_copy_cb_t )(void *user_specific)
typedef void(* globus_ftp_client_perf_plugin_user_destroy_cb_t )(void *user_specific)
Functions
globus_result_t globus_ftp_client_perf_plugin_init (globus_ftp_client_plugin_t *plugin, globus_ftp_client_perf_plugin_begin_cb_t begin_cb, globus_ftp_client_perf_plugin_marker_cb_t marker_cb, globus_ftp_client_perf_plugin_complete_cb_t complete_cb, void *user_specific)
globus_result_t globus_ftp_client_perf_plugin_set_copy_destroy (globus_ftp_client_plugin_t *plugin, globus_ftp_client_perf_plugin_user_copy_cb_t copy_cb, globus_ftp_client_perf_plugin_user_destroy_cb_t destroy_cb)
globus_result_t globus_ftp_client_perf_plugin_destroy (globus_ftp_client_plugin_t *plugin)
globus_result_t globus_ftp_client_perf_plugin_get_user_specific (globus_ftp_client_plugin_t *plugin, void **user_specific)
Detailed Description
The FTP Performance Marker plugin allows the user to obtain performance markers for all types of transfers except a third party transfer in which Extended Block mode is not enabled.
These markers may be generated internally, or they may be received from a server ('put' or third_party_transfer' only).
Copy constructor and destructor callbacks are also provided to allow one to more easily layer other plugins on top of this one.
Macro Definition Documentation
#define GLOBUS_FTP_CLIENT_PERF_PLUGIN_MODULE (&globus_i_ftp_client_perf_plugin_module)
Module descriptorTypedef Documentation
typedef void(* globus_ftp_client_perf_plugin_begin_cb_t)(void *user_specific, globus_ftp_client_handle_t *handle, const char *source_url, const char *dest_url, globus_bool_t restart)
Transfer begin callbackThis callback is called when a get, put, or third party transfer is started. Note that it is possible for this callback to be made multiple times before ever receiving the complete callback... this would be the case if a transfer was restarted. The 'restart' will indicate whether or not we have been restarted.
Parameters:
-
handle this the client handle that this transfer will be occurring on
user_specific this is user specific data either created by the copy method, or, if a copy method was not specified, the value passed to init
source_url source of the transfer (GLOBUS_NULL if 'put')
dest_url dest of the transfer (GLOBUS_NULL if 'get')
restart boolean indicating whether this callback is result of a restart
Returns:
-
- •
- n/a
typedef void(* globus_ftp_client_perf_plugin_complete_cb_t)(void *user_specific, globus_ftp_client_handle_t *handle, globus_bool_t success)
Transfer complete callbackThis callback will be called upon transfer completion (successful or otherwise)
Parameters:
-
handle this the client handle that this transfer was occurring on
user_specific this is user specific data either created by the copy method, or, if a copy method was not specified, the value passed to init
success indicates whether this transfer completed successfully or was interrupted (by error or abort)
Returns:
-
- •
- n/a
typedef void(* globus_ftp_client_perf_plugin_marker_cb_t)(void *user_specific, globus_ftp_client_handle_t *handle, long time_stamp_int, char time_stamp_tength, int stripe_ndx, int num_stripes, globus_off_t nbytes)
Performance marker received callbackThis callback is called for all types of transfers except a third party in which extended block mode is not used (because 112 perf markers wont be sent in that case). For extended mode 'put' and '3pt', actual 112 perf markers will be used and the frequency of this callback is dependent upon the frequency those messages are received. For 'put' in which extended block mode is not enabled and 'get' transfers, the information in this callback will be determined locally and the frequency of this callback will be at a maximum of one per second.
Parameters:
-
handle this the client handle that this transfer is occurring on
user_specific this is user specific data either created by the copy method, or, if a copy method was not specified, the value passed to init
time_stamp the timestamp at which the number of bytes is valid
stripe_ndx the stripe index this data refers to
num_stripes total number of stripes involved in this transfer
nbytes the total bytes transferred on this stripe
Returns:
-
- •
- n/a
typedef void*(* globus_ftp_client_perf_plugin_user_copy_cb_t)(void *user_specific)
Copy constructorThis callback will be called when a copy of this plugin is made, it is intended to allow initialization of a new user_specific data
Parameters:
- user_specific this is user specific data either created by this copy method, or the value passed to init
Returns:
-
- •
- a pointer to a user specific piece of data
- •
- GLOBUS_NULL (does not indicate error)
typedef void(* globus_ftp_client_perf_plugin_user_destroy_cb_t)(void *user_specific)
DestructorThis callback will be called when a copy of this plugin is destroyed, it is intended to allow the user to free up any memory associated with the user specific data
Parameters:
- user_specific this is user specific data created by the copy method
Returns:
-
- •
- n/a
Function Documentation
globus_result_t globus_ftp_client_perf_plugin_destroy (globus_ftp_client_plugin_t *plugin)
Destroy performance marker pluginFrees up memory associated with plugin
Parameters:
- plugin plugin previously initialized with init (above)
Returns:
-
- •
- GLOBUS_SUCCESS
- •
- Error on NULL plugin
globus_result_t globus_ftp_client_perf_plugin_get_user_specific (globus_ftp_client_plugin_t *plugin, void **user_specific)
Retrieve user specific pointerParameters:
-
plugin plugin previously initialized with init (above)
user_specific pointer to storage for user_specific pointer
Returns:
-
- •
- GLOBUS_SUCCESS
- •
- Error on NULL plugin
- •
- Error on NULL user_specific
globus_result_t globus_ftp_client_perf_plugin_init (globus_ftp_client_plugin_t *plugin, globus_ftp_client_perf_plugin_begin_cb_tbegin_cb, globus_ftp_client_perf_plugin_marker_cb_tmarker_cb, globus_ftp_client_perf_plugin_complete_cb_tcomplete_cb, void *user_specific)
Initialize a perf pluginThis function initializes a performance marker plugin. Any params except for the plugin may be GLOBUS_NULL
Parameters:
-
plugin a pointer to a plugin type to be initialized
user_specific a pointer to some user specific data that will be provided to all callbacks
begin_cb the callback to be called upon the start of a transfer
marker_cb the callback to be called with every performance marker received
complete_cb the callback to be called to indicate transfer completion
Returns:
-
- •
- GLOBUS_SUCCESS
- •
- Error on NULL plugin
- •
- Error on init internal plugin
globus_result_t globus_ftp_client_perf_plugin_set_copy_destroy (globus_ftp_client_plugin_t *plugin, globus_ftp_client_perf_plugin_user_copy_cb_tcopy_cb, globus_ftp_client_perf_plugin_user_destroy_cb_tdestroy_cb)
Set user copy and destroy callbacksUse this to have the plugin make callbacks any time a copy of this plugin is being made. This will allow the user to keep state for different handles.
Parameters:
-
plugin plugin previously initialized with init (above)
copy_cb func to be called when a copy is needed
destroy_cb func to be called when a copy is to be destroyed
Returns:
-
- •
- Error on NULL arguments
- •
- GLOBUS_SUCCESS
Author
Generated automatically by Doxygen for globus_ftp_client from the source code.