Hi guys,
I'd like a bit of a sanity check and some help.
We have an object that's reasonably big and expensive to construct (processing and database usage). This object basically provides a structure for the system to work - the objects are referenced to perform operations, but never changed.
So, this expensive object can be cached and shared between all users as it should not be changed by any user operation.
So my question is: is there a way to ensure the application only reads from this object (and it's sub-object arrays), but never changes the object or any of it's sub-objects?
Basically, I need to create a read-only version of the object (and it's arraylists of objects).
Any help is much appreciated on how best to achieve this?
Cheers,
Steve
I'd like a bit of a sanity check and some help.
We have an object that's reasonably big and expensive to construct (processing and database usage). This object basically provides a structure for the system to work - the objects are referenced to perform operations, but never changed.
So, this expensive object can be cached and shared between all users as it should not be changed by any user operation.
So my question is: is there a way to ensure the application only reads from this object (and it's sub-object arrays), but never changes the object or any of it's sub-objects?
Basically, I need to create a read-only version of the object (and it's arraylists of objects).
Any help is much appreciated on how best to achieve this?
Cheers,
Steve