FACTOID #151: The five countries with the highest coffee consumption are also the five countries whose citizens trust one another the most. Coincidence? Probably.
In databases and transaction processing, serializability is the property of a schedule being serializable. It means equivalence to a serial schedule. It relates to the isolation property of a transaction. A database is an organized collection of data. ... In computer science, a transaction is a group of logical operations that must all succeed or fail as a group. ... For schedule in computer science, see schedule (computer science). ... In the field of databases, a schedule is a list of actions, (i. ... // General characteristics In an older computer science context serialization means to force one-at-a-time access for the purposes of concurrency control. ... In database systems, isolation is a property that the changes made by an operation are not visible to other simultaneous operations on the system until its completion. ... A transaction is an agreement, communication, or movement carried out between separate entities or objects. ...
Two types of serializability exist: Conflict serializability, and View serializability. The class of schedules with the latter property contains the class of the first.
Conflict serializability has a simple test: The conflict graph of the schedule, the graph representing conflicting operations in the schedule, needs to be acyclic.
A useful way to enforce conflict serializability globally in a distributed system, where transactions span multiple databases, is to use the commitment ordering property, a special case of serializability. in commitment-ordering the commitment events of the transactions are utilized to determine the (partial) order of the transactions in the serializable schedule. The commitment events are generated by an atomic commitment protocol, that may be distributed or centralized.
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.
All subtypes of a serializable class are themselves serializable.
Serializable classes that need to designate an alternative object to be used when writing an object to the stream should implement this special method with the exact signature:
It is an error to declare a class Serializable if this is not the case.
The serialization runtime associates with each serializable class a version number, called a serialVersionUID, which is used during deserialization to verify that the sender and receiver of a serialized object have loaded classes for that object that are compatible with respect to serialization.
If a serializable class does not explicitly declare a serialVersionUID, then the serialization runtime will calculate a default serialVersionUID value for that class based on various aspects of the class, as described in the Java(TM) Object Serialization Specification.