ud.data = (void *) cbi;
ud.free_func = cjni_callback_info_destroy;
- plugin_register_complex_read (cbi->name, cjni_read, &ud);
+ plugin_register_complex_read (cbi->name, cjni_read,
+ /* interval = */ NULL, &ud);
(*jvm_env)->DeleteLocalRef (jvm_env, o_read);
} /* int plugin_register_read */
int plugin_register_complex_read (const char *name,
- plugin_read_cb callback, user_data_t *user_data)
+ plugin_read_cb callback,
+ const struct timespec *interval,
+ user_data_t *user_data)
{
read_func_t *rf;
rf->rf_callback = (void *) callback;
sstrncpy (rf->rf_name, name, sizeof (rf->rf_name));
rf->rf_type = RF_COMPLEX;
- rf->rf_interval.tv_sec = 0;
- rf->rf_interval.tv_nsec = 0;
+ if (interval != NULL)
+ {
+ rf->rf_interval = *interval;
+ }
rf->rf_effective_interval = rf->rf_interval;
/* Set user data */
int plugin_register_read (const char *name,
int (*callback) (void));
int plugin_register_complex_read (const char *name,
- plugin_read_cb callback, user_data_t *user_data);
+ plugin_read_cb callback,
+ const struct timespec *interval,
+ user_data_t *user_data);
int plugin_register_write (const char *name,
plugin_write_cb callback, user_data_t *user_data);
int plugin_register_flush (const char *name,