Re: [libvirt-java] [PATCH 36/65] jna: Wrap the virEvent(Add, Remove)Timeout libvirt functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 04, 2014 at 08:31:04AM +0100, Claudio Bley wrote:
> At Mon, 3 Mar 2014 15:58:25 +0000,
> Daniel P. Berrange wrote:
> > 
> > On Mon, Mar 03, 2014 at 04:46:51PM +0100, Claudio Bley wrote:
> > > At Fri, 21 Feb 2014 11:01:47 +0000,
> > > Daniel P. Berrange wrote:
> > > > 
> > > > ACK, if you also add the virEventUpdateTimeout  method
> > > 
> > > OK, but why should I add it? It's useless (for the user) and unused by
> > > the wrapping code. I want to keep the JNA library definition clean --
> > > e.g. in a later patch I remove all the *UUIDString functions.
> > 
> > What makes you say it is useless ?
> 
> I don't regard the JNA mappings part of the public API of the Java
> bindings. It is a private implementation detail, which is (alas)
> public solely due to technical/historical reasons.
> 
> So, it is useless for the user, because there is no way that he can
> use it (via the /public/ API)...
> 
> Furthermore, I think there is no reason to expose those functions to
> the user at all. There are other means to program timeouts in Java
> than using the JNA wrapped libvirt functions where you have to run an
> event loop and take some speed drawbacks into account (libffi / native
> code to Java transition).

Well we exposed them to the user in the C library because people did
have a use for them. Sure you could use a separate Java APIs for doing
timeouts, but IMHO many apps will find it useful to have just one
single event loop in their program and thus want to make use of the
libvirt virEvent{Add,Update,Remove}{Handle,Timer} APIs from their
app.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]