java - How does Terracotta work in this situation? -
Indicates that I have a N shape set to server server:
I have a simple Java Bean / POJO:
package example; Public Sector Person {Private Other Object Ob; Public Zero Set Obj (Other Object Oobies) {synchronize (this) {obj = theObj; }} Public other object getObj () {synchronize (this) {return obj; }}} Now if a customer calls person.setObj (other object) on a person object in TC Route (data structure), then synchronized block
1) Unless the N size server is in the server array all of N (Person.setObj exists on it Object) has been synchronized / updated with that person. Bob's specialty?
or
2) Until the "active" server has been synchronized with that updated person, the Obj feature? Are the other ( N-1 ) servers synchronized as much as possible in the array?
or
3) What other methods do I see?
The answer is not actually 1 or 2. Objects The entire server mirror group For the first time, this field has been set, a transaction has been created and the selected mirror group for that first transaction will then be "self".
Regarding both 1 and 2, there is no need to update all active server groups, so there is no need to wait for any of those situations.
You can find more information about how to configure a terracotta server array on the terracotta document:
, Cluster lock will be organized on this person object (mutual exclusion across clusters while doing object modification). The scope of the synchronized block uses the above mentioned transaction. In the GetObj () method, you can configure it as a reading lock which will allow multiple concurrent readers of the cluster.
Comments
Post a Comment