Hi,
I am trying MVStore for storing & managing a large number of Java 
serializable objects.
I develop a simple Java program.  It uses a HashMap<String, UserData> to 
keep a number of
UserData Java objects.

          mvs = MVStore.open(".\\test.h2mvs"); 
          mvs.setAutoCommitDelay(10);
          data_store = mvs.openMap(test_hint);
          user_accounts = new HashMap<String, UserData>();
          for (int i=0; i<10; i++) {
             String id = "cust_" + (i+1);
             user_accounts.put(id, new UserData(id));
          }
          data_store.put("user_accounts", user_accounts);
          ...
          mvs.close();

I found that all of the UserData objects contained in the user_accounts 
HashMap are
serialized to the file if the following code

          data_store.put("user_accounts", user_accounts);

is executed.  I have two questions (needs):

1) How to trigger the serialization to happen when one of serveral UserData 
objects
in the user_accounts HashMap are modified?

2) How to serialize only those UserData objects in the user_accounts 
HashMap modified?

Any help will be highly appreciated!

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to