Method and system for maintaining forward and backward compatibility in flattened object streams
First Claim
1. A method of computer-implemented steps for object-oriented management of serializable objects, the method comprising:
- identifying an object, wherein the object comprises a set of attributes;
associating a class version identifier with the object, wherein the class version identifier identifies the object as an instance of a specific version of a class;
associating an attribute version identifier with an attribute in the set of attributes such that each attribute in the set of attributes is associated with an attribute version identifier;
reading a data stream representing a serialized object, wherein the data stream comprises a serialized class version identifier, a set of attribute serialized attribute values, and a set of serialized attribute version identifiers, wherein serialized attribute version identifiers in the set of serialized attribute version identifiers are paired with serialized attribute values in the set of serialized attribute values;
reading a class identifier for the serialized object from the date stream;
instantiating the object in accordance with the class identifier, wherein the class version identifier of the object and the serialized class version identifier of the serialized object may differ;
reading an attribute count for the set of serialized attribute values from the data stream;
mapping attributes between the object and the serialized object; and
storing serialized attribute values from the data stream in the object and in response to a determination that a serialized attribute version identifier is greater than or subsequent to the class version identifier of the object, refraining from storing in the object a serialized attribute value associated with the serialized attribute version identifier.
1 Assignment
0 Petitions
Accused Products
Abstract
A method, a system, an apparatus, and a computer program product are presented for object-oriented management of serializable objects. An object has a set of attributes and a class version number, which identifies the object as an instance of a specific version of a class. In addition, each attribute in the object has an attribute version number, which may represent a version of a class in which the associated attribute was initially declared within the class. The object may be serialized into a data stream, and the data stream has the class version number of the object, an attribute value for each attribute in the set of attributes, and an attribute version number for each attribute in the set of attributes. The data stream may also have a class identifier for the class of the object and an attribute count for the set of attributes into the data stream.
-
Citations
11 Claims
-
1. A method of computer-implemented steps for object-oriented management of serializable objects, the method comprising:
-
identifying an object, wherein the object comprises a set of attributes; associating a class version identifier with the object, wherein the class version identifier identifies the object as an instance of a specific version of a class; associating an attribute version identifier with an attribute in the set of attributes such that each attribute in the set of attributes is associated with an attribute version identifier; reading a data stream representing a serialized object, wherein the data stream comprises a serialized class version identifier, a set of attribute serialized attribute values, and a set of serialized attribute version identifiers, wherein serialized attribute version identifiers in the set of serialized attribute version identifiers are paired with serialized attribute values in the set of serialized attribute values; reading a class identifier for the serialized object from the date stream; instantiating the object in accordance with the class identifier, wherein the class version identifier of the object and the serialized class version identifier of the serialized object may differ; reading an attribute count for the set of serialized attribute values from the data stream; mapping attributes between the object and the serialized object; and storing serialized attribute values from the data stream in the object and in response to a determination that a serialized attribute version identifier is greater than or subsequent to the class version identifier of the object, refraining from storing in the object a serialized attribute value associated with the serialized attribute version identifier. - View Dependent Claims (2)
-
-
3. A method of computer-implemented steps for providing backwards and forwards compatibility between different version of serialized object data, the method comprising:
-
identifying an object, wherein the object comprises a set of attributes, wherein each attribute in the set of attributes is associated with a version identifier, and wherein the object is an instance of a first version of a class; writing a data stream representing a serialization of the object'"'"'s attributes and associated version identifiers; reading a data stream representing a serialized object into a new object instance of a second version of a class; and refraining from storing attributes from the data stream into the new object instance that are not represented in the new object instance while reading the data stream. - View Dependent Claims (4)
-
-
5. A computer product on a computer readable storage medium for use in a data processing system for object-oriented management of serializable objects, the computer program product comprising:
-
instructions for identifying an object, wherein the object comprises a set of attributes; instructions for associating a class version identifier with the object, wherein the class version identifier identifies the object as an instance of a specific version of a class; instructions for associating an attribute version identifier with an attribute in the set of attributes such that each attribute in the set of attributes is associated with an attribute version identifier; instructions for reading a data stream representing a serialized object, wherein the data stream comprises a serialized class version identifier, a set of serialized attribute values, and a set of serialized attribute version identifiers, wherein serialized attribute version identifiers in the set of serialized attribute version identifiers are a paired with serialized attribute values in the set of serialized attribute values; instructions for reading a class identifier for the serialized object from the data stream; instructions for instantiating the object in accordance with the class identifier, wherein the class version identifier of the object and the serialized class version identifier of the serialized object may differ; instructions for reading an attribute count for the set of serialized attribute values from the data stream; instructions for mapping attributes between the object and the serialized object; and instructions for storing serialized attribute values from the data stream in the object and instructions for refraining from storing in the object a serialized attribute value associated with the serialized attribute version identifier in response to a determination that a serialized attribute version identifier is greater than or subsequent to the class version identifier of the object. - View Dependent Claims (6)
-
-
7. A computer program product on a computer readable storage medium for use in a data processing system for providing backwards and forwards compatibility between different version of serialized object data, the computer program product comprising:
-
instructions for identifying an object, wherein the object comprises a set of attributes, wherein each attribute in set of attributes is associated with a version identifier, and wherein the object is an instance of a first version of a class; instructions for writing a data stream representing serialization of the object'"'"'s attributes and associated version identifiers; instructions for reading a data stream representing a serialized object into a new object instance of a second version of a class; and instructions for refraining from storing attributes from the data stream into the new object instance that are not represented in the new object instance while reading the data stream. - View Dependent Claims (8)
-
-
9. An apparatus for object-oriented management of serializable objects, the apparatus comprising:
-
means for identifying an object, wherein the object comprises a set of attributes; means for associating a class version identifier with the object, wherein the class version identifier identifies the object as an instance of a specific version of a class; means for associating an attribute version identifier with an attribute in the set of attributes such that each attribute in the set of attributes is associated with an attribute version identifier; means for reading a data stream representing a serialized object, wherein the data stream comprises a serialized class version identifier, a set of serialized attribute values, and a set of serialized attribute version identifiers, wherein serialized attribute version identifiers in the set of serialized attribute version identifiers are paired with serialized attribute values in the set of serialized attribute values; means for reading a class identifier for the serialized object from the data stream; means for instantiating the object in accordance with the class identifier, wherein the class version identifier of the object and the serialized class version identifier of the serialized object may differ; means for reading an attribute count for the set of serialized attribute values from the data stream; means for mapping attributes between the object and the serialized object; and means for storing serialized attribute values from the data stream in the object and means for refraining from storing in the object a serialized attribute version identifier in response to a determination that a serialized attribute version identifier is greater than or subsequent to the class version of the object. - View Dependent Claims (10)
-
-
11. An apparatus for providing backwards and forwards compatibility between different versions of serialized object data, the apparatus comprising:
-
means for identifying an object, wherein the object comprises a set of attributes, wherein each attribute in the set of attributes is associated with a version identifier, and wherein the object is an instance of a first version of a class; means for writing a data stream representing serialization of the object'"'"'s attributes and associated version identifiers; means for reading a data stream representing a serialized object into a new object instance of a second version of a class; and means for refraining from storing attributes from the data stream into the new object instance that are not represented in the new object instance while reading the data stream.
-
Specification