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

Re: [Libvir] Documentation errors and shortcomings

Thanks for the replays

If an individual stats field isn't supported by the hypervisor, it will be returned as ((long long) -1) [for various reasons we're using long long here, but really we mean 64 bit signed int].
Thats very useful info, I spent quite a lot of time messing with BigIntegers, because I didn't want to loose the top bit.

By the way, there are quite a few unisgned ints, and unsigned longs in the API. Am I right to assume that "unsigned int" is 32 bits, so It will only fit into a java long, and "unsigned long" is 64 bits, so it won't fit safely in any java primitive variable? (Apart form the stats members, as you wrote above)

Interesting, so you're using JNI direct access to the C library, right ?
I looked at this a few weeks ago, but it was looking like accessing using the
remote access would have made the Java bindings more platform independant
but I had troubles with the RPC/TLS support, and didn't go very far. Maybe
a JNI based solution is good enough for most potential Java users.
I thought about that too, but then I read the stern warnings about not using the private on-the-wire protocol, so I settled on JNI. I think getting all the crypto and protocol stuff right would be more work than the JNI version, anyway. Of course since most people won't want to run the JVM as root, having to use a network URI is almost required through JNI, too.

Also, I have found an other possible problem in the API/documentation:
The Enum virDomainRestart is defined, but it is not referenced anywhere. Is it the flag parameter to reboot?

(I've made the mistake of signing up for the digest version of the mailing list, so I can't directly reply, but I hope I won't mess up the threading)


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