Space Object ID
How Space Object ID is Generated?
You can insert an object into the space using the Write() and WriteMultiple() methods. When a new object is inserted into the space, it embeds a unique ID - called the UID. The UID can be generated explicitly by the client using a unique value generated by the application business logic or using a sequencer running within the space.
The space UID for space object can be created in three different ways:
- When a space object has no
SpaceIdproperty declared, the space generates a UID for the object. - When a space object has a property which is declared as
SpaceIdand marked asauto-generate=false, the UID is generated based on the value of the ID field the user is setting. - When a space object has a property which is declared as
SpaceIdand marked asauto-generate=true, the UID is generated by the space and placed back into the field using the relevant setter method. In this case, the field must be aStringtype.
The SpaceId Field content
- When a space Class has no
SpaceIdproperty declared, it will be returned without any ID. This means that update operations cannot be executed on the space Class. Only theRead()andWrite()methods can be executed. - When a space Class has a property which is declared as
SpaceIdandauto-generate=trueand its value isnull, theSpaceIdfield will store the ID. - When a space Class has a property which is declared as
SpaceIdandauto-generate=trueand its value is not null, theSpaceIdfield will store the original value stored within theSpaceIdfield. - When a space Class has a property which is declared as
SpaceIdandauto-generate=false, theSpaceIdfield will store the original value stored within theSpaceIdfield used to generate the UID.
In-Memory Data Grid - achieve unparalleled speed, persistence, and accuracy.