prevayler

How to deserialize object in OpenJDK (Android 7+), which has been serialized in Apache Harmony (Android *-6)?

大憨熊 提交于 2019-12-19 03:58:56
问题 My app uses http://prevayler.org/ for persistence, piggybacking Java Object serialization. After upgrade to Android 7.0 (Nougat) users cannot open their data, since the deserialization does not work any more: java.io.StreamCorruptedException: invalid type code: 71 at java.io.ObjectInputStream.readString(ObjectInputStream.java:1647) at java.io.ObjectInputStream.readEnum(ObjectInputStream.java:1737) ... at java.io.ObjectInputStream.readObject(ObjectInputStream.java:373) at org.prevayler

What are synchronizing strategies for Prevayler?

人盡茶涼 提交于 2019-11-30 07:39:25
问题 Prevayler guarantees that all the writes ( through its transactions) are synchronized. But what about reads? Is it right that dirty reads are possible if no explicit synchronizing is used (in user code)? Are they possible if a business object is read as: // get the 3rd account Accont account = (Bank)prevayler.prevalentSystem().getAccounts().get(2); ? If so what synchronizing strategies are good for a user code? (Consider a business object A contains a collection of business objects Bs), using

What are synchronizing strategies for Prevayler?

一世执手 提交于 2019-11-29 04:46:47
Prevayler guarantees that all the writes ( through its transactions) are synchronized. But what about reads? Is it right that dirty reads are possible if no explicit synchronizing is used (in user code)? Are they possible if a business object is read as: // get the 3rd account Accont account = (Bank)prevayler.prevalentSystem().getAccounts().get(2); ? If so what synchronizing strategies are good for a user code? (Consider a business object A contains a collection of business objects Bs), using a synchronized collection (of Bs inside of A), for example from java.util.concurrent package?