Illarion Kovalchuk
Illarion Kovalchuk

Reputation: 5894

How to implement something like Terracota?

How Terracotta knows that object is changed inside one JVM to propagate this change to another JVM? I.e. how can I code similar behavior?

I want to be able to watch changes in instances of some classes, without changing them at all.

Upvotes: 0

Views: 121

Answers (2)

Anubis05
Anubis05

Reputation: 1274

Shouldn't a observer pattern help. If you implement your class as observable and have an oberver , the observer will be notified when ever the observable class goes through some change.

Upvotes: 0

Augusto
Augusto

Reputation: 29937

It uses instrumentation. It's explained (in high level) in the terracotta wiki

Upvotes: 1

Related Questions