| | |
| | | */ |
| | | public void clear() |
| | | { |
| | | synchronized (this) |
| | | synchronized (list) |
| | | { |
| | | list.clear(); |
| | | } |
| | |
| | | |
| | | saved = false; |
| | | |
| | | synchronized(this) |
| | | synchronized(list) |
| | | { |
| | | Short id = changeNumber.getServerId(); |
| | | ChangeNumber oldCN = list.get(id); |
| | |
| | | |
| | | boolean result = false; |
| | | |
| | | clear(); |
| | | for (Short id : serverState) { |
| | | ChangeNumber maxChangeNumber = getMaxChangeNumber(id); |
| | | if (update(maxChangeNumber)) { |
| | | result = true; |
| | | synchronized (list) |
| | | { |
| | | clear(); |
| | | for (Short id : serverState) { |
| | | ChangeNumber maxChangeNumber = serverState.getMaxChangeNumber(id); |
| | | if (this.update(maxChangeNumber)) { |
| | | result = true; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | HashSet<String> set = new HashSet<String>(); |
| | | |
| | | synchronized (this) |
| | | synchronized (list) |
| | | { |
| | | for (Short key : list.keySet()) |
| | | { |
| | |
| | | { |
| | | ArrayList<ByteString> values = new ArrayList<ByteString>(0); |
| | | |
| | | synchronized (this) |
| | | synchronized (list) |
| | | { |
| | | for (Short id : list.keySet()) |
| | | { |
| | |
| | | { |
| | | StringBuilder buffer = new StringBuilder(); |
| | | |
| | | synchronized (this) |
| | | synchronized (list) |
| | | { |
| | | for (Short key : list.keySet()) |
| | | { |
| | |
| | | */ |
| | | public byte[] getBytes() throws UnsupportedEncodingException |
| | | { |
| | | synchronized (this) |
| | | synchronized (list) |
| | | { |
| | | int length = 0; |
| | | List<String> idList = new ArrayList<String>(list.size()); |
| | |
| | | public ServerState duplicate() |
| | | { |
| | | ServerState newState = new ServerState(); |
| | | synchronized (this) |
| | | synchronized (list) |
| | | { |
| | | for (Short key : list.keySet()) |
| | | { |