Custom Governor-Policy instances
Hi,
In the RAM documentation for policies there is a governor that constructs its policies in advance and keeps them in a Map (i.e. singleton).
A few questions about this:
1. Is the governor also a singleton for the entire repository?
2. Should we avoid using read/write instance attributes in a policy in case invocations from different lifecycles overlap?
3. Are invocations of the test() method externally synchronized? test() isn't marked as synchronized in the base class.
4. Would it be a better (safer) practice for the governor to create a new instance every time getPolicy() is called?
Thanks in advance for your insight!
In the RAM documentation for policies there is a governor that constructs its policies in advance and keeps them in a Map (i.e. singleton).
A few questions about this:
1. Is the governor also a singleton for the entire repository?
2. Should we avoid using read/write instance attributes in a policy in case invocations from different lifecycles overlap?
3. Are invocations of the test() method externally synchronized? test() isn't marked as synchronized in the base class.
4. Would it be a better (safer) practice for the governor to create a new instance every time getPolicy() is called?
Thanks in advance for your insight!