Object state transfer method, object state transfer device, object state transfer program, and recording medium for the program
First Claim
1. An object state transfer method in a data processing device comprising an application program, and a plurality of objects having internal states, which can be manipulated from the application program, comprising the steps of:
- determining whether an object is shared among a plurality of data processing devices;
when the object is shared among the plurality of data processing devices, storing the object as a shared object in a shared heap region;
when the object is not shared among the plurality of data processing devices, storing the object in a heap region;
transferring the states of shared objects to another data processing device by transmitting the shared heap region in unaltered form to the other data processing device,specifying beforehand a class to be transferred to the other data processing device as a transfer class;
when a command to create a new object has been issued by the application program, determining whether a class to be created, specified by the application program, is contained in the transfer class;
when the class to be created is not contained in the transfer class, creating a new object in the heap region; and
when the class to be created is contained in the transfer class, creating a new shared object in the shared heap region.
0 Assignments
0 Petitions
Accused Products
Abstract
When the states of a large number of objects must be transferred to another device, the overhead can be greatly reduced and the object states can be synchronized in a short period of time. At the time of creating an object, an object creation function arranges the internal state of the object into a byte sequence in a region for transfer, and sets mapping data in a mapping management table. When an application program has manipulated the internal state by using an accessor method, the state is set in the byte sequence in the region for transfer, or obtained therefrom. A transfer function transfers the byte sequence in the region for transfer and the mapping management table to a receiver, where a reproduction function reproduces the object based on the received data.
-
Citations
14 Claims
-
1. An object state transfer method in a data processing device comprising an application program, and a plurality of objects having internal states, which can be manipulated from the application program, comprising the steps of:
-
determining whether an object is shared among a plurality of data processing devices; when the object is shared among the plurality of data processing devices, storing the object as a shared object in a shared heap region; when the object is not shared among the plurality of data processing devices, storing the object in a heap region; transferring the states of shared objects to another data processing device by transmitting the shared heap region in unaltered form to the other data processing device, specifying beforehand a class to be transferred to the other data processing device as a transfer class; when a command to create a new object has been issued by the application program, determining whether a class to be created, specified by the application program, is contained in the transfer class; when the class to be created is not contained in the transfer class, creating a new object in the heap region; and when the class to be created is contained in the transfer class, creating a new shared object in the shared heap region. - View Dependent Claims (2, 3)
-
-
4. An object state transfer method in a data processing device comprising an application program, and a plurality of objects having internal states, which can be manipulated from the application program, comprising the steps of:
-
determining whether an object is shared among a plurality of data processing devices; when the object is shared among the plurality of data processing devices, storing the object as a shared object in a shared heap region; when the object is not shared among the plurality of data processing devices, storing the object in a heap region; transferring the states of shared objects to another data processing device by transmitting the shared heap region in unaltered form to the other data processing device, determining, when the application program has issued a command to manipulate an internal state of an object, whether the object to be manipulated is stored in the shared heap region, based on an address of the object to be manipulated supplied by the application program, and determining whether the manipulation comprises setting the internal state; and when the object to be manipulated is stored in the shared heap region and the manipulation comprises setting the internal state, setting a flag showing that, among a plurality of blocks comprising the shared heap region, the block where the object to be manipulated is stored has been updated. - View Dependent Claims (5, 6, 7, 8, 9)
-
-
10. An object state transfer method in a data processing device comprising an application program, and a plurality of objects having internal states, which can be manipulated from the application program, comprising the steps of:
-
determining whether an object is shared among a plurality of data processing devices; when the object is shared among the plurality of data processing devices, storing the object as a shared object in a shared heap region; when the object is not shared among the plurality of data processing devices, storing the object in a heap region; transferring the states of shared objects to another data processing device by transmitting the shared heap region in unaltered form to the other data processing device, wherein another data processing device, which reproduces the shared objects, performs the steps of; receiving the shared heap region, and arranging the transferred shared heap region to a shared heap region in the other data processing device; calculating the difference between an address of the transferred shared heap region which is contained in the transferred shared heap region, with an address of the shared heap region in the other data processing device which is contained in the shared heap region in the other data processing device; determining whether a pointer in a shared object contained in the transferred shared heap region points to a position in the transferred shared heap region; correcting the pointer, based on the difference between the addresses, when the pointer points to a position in the transferred shared heap region; and nullifying the pointer, when the pointer points to a position outside the transferred shared heap region. - View Dependent Claims (11, 12)
-
-
13. An object state transfer device in a data processing device comprising an application program, and a plurality of objects having internal states, which can be manipulated from the application program, comprising:
-
a shared heap region which stores, from among the plurality of objects, objects which are shared among a plurality of data processing devices, as shared objects; a heap region which stores, from among the plurality of objects, objects which are not shared among the plurality of data processing devices; and a transfer unit which transfers internal states of the shared objects to another data processing device by transmitting the shared heap region in unaltered form to the other data processing device, wherein the shared heap region comprises a plurality of blocks for storing the shared objects, and flags showing whether each of the plurality of blocks has been updated, and wherein the object state transfer device further comprises; a transfer class memory unit which stores a transfer class to be transferred to the other data processing device; an object creation unit which, in response to a command from the application program to create a new object, together with the specification of a class to be created, creates a new object in the heap region in the case when the command specifies a class not contained in the transfer class as the class to be created, and creates a new shared object in the shared heap region when the command specifies a class already contained in the transfer class as the class to be created; and a unit which, in response to a command from the application program to manipulate an internal state of an object, together with an address of the object to be manipulated, detects the command to set an internal state of an object in the shared heap region, based on the address of the object to be manipulated and the content of the manipulation, and which sets a flag which corresponds to the block where the object to be manipulated is stored, and wherein the transfer unit transfers the whole of the shared heap region, or only the blocks whose flags are set, to the other data processing device, in compliance with a predetermined transfer method.
-
-
14. An object state transfer device in a data processing device comprising an application program, and a plurality of objects having internal states, which can be manipulated from the application program, comprising:
-
a shared heap region which stores an address of the shared heap region itself, and objects, from among the plurality of objects, which are shared among a plurality of data processing devices, as shared objects; a heap region which stores, from among the plurality of objects, objects which are not shared among the plurality of data processing devices; a reproduction unit for reproducing the shared objects which receives a shared heap region transferred from another data processing device and arranges the transferred shared heap region to its own shared heap region, calculates the difference between an address of the transferred shared heap region and an address of its own shared heap region, and, among pointers in shared objects contained in the transferred shared heap region, corrects a pointer which points to a position in the transferred shared heap region, based on the difference in the addresses, and nullifies a pointer which points to a position outside the transferred shared heap region; and an object management unit which notifies the application program of data relating to the reproduced shared object.
-
Specification