M
Me
Hi...
I was working with the Preferences class, and I was wondering about the
importPreferences method. Specifically, after you do an
importPreferences, do the elements loaded get kept in the runtime space
and used for later prefs.node() calls and the like?
Or are they persisted to the backing store right away and all pref
fetching operations operate from the backing store?
The sun doc page on it says "This method is an exception to the general
rule that the results of concurrently executing multiple methods in
this class yields results equivalent to some serial execution. The
method behaves as if implemented on top of the other public methods in
this class, notably node(String) and put(String, String)." which
doesn't seem clear to me. What do they mean by "on top of."
I would expect that node() and put()s followed by gets would be working
from in-memory copies, as those methods don't say when they get flushed
to the backing store. The fact that flush() exists implies that
there's potentially some kind of disconnect between the two. I'd also
imagine that once fetched, re-fetches come from memory instead of the
backing store.
But importPreferences() is such a wholesale operation, I wasn't sure
what would happen there.
Thanks
-Mark
I was working with the Preferences class, and I was wondering about the
importPreferences method. Specifically, after you do an
importPreferences, do the elements loaded get kept in the runtime space
and used for later prefs.node() calls and the like?
Or are they persisted to the backing store right away and all pref
fetching operations operate from the backing store?
The sun doc page on it says "This method is an exception to the general
rule that the results of concurrently executing multiple methods in
this class yields results equivalent to some serial execution. The
method behaves as if implemented on top of the other public methods in
this class, notably node(String) and put(String, String)." which
doesn't seem clear to me. What do they mean by "on top of."
I would expect that node() and put()s followed by gets would be working
from in-memory copies, as those methods don't say when they get flushed
to the backing store. The fact that flush() exists implies that
there's potentially some kind of disconnect between the two. I'd also
imagine that once fetched, re-fetches come from memory instead of the
backing store.
But importPreferences() is such a wholesale operation, I wasn't sure
what would happen there.
Thanks
-Mark