Changeset dfc4948
- Timestamp:
- Jul 5, 2013 6:21:42 PM (8 years ago)
- Branches:
- master
- Children:
- 76de4fa
- Parents:
- ba0e58e6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
apps/streaming/java/src/net/i2p/client/streaming/TCBShare.java
rba0e58e6 rdfc4948 37 37 _context = ctx; 38 38 _log = ctx.logManager().getLog(TCBShare.class); 39 _cache = new ConcurrentHashMap (4);39 _cache = new ConcurrentHashMap<Destination,Entry>(4); 40 40 _cleaner = new CleanEvent(timer); 41 41 _cleaner.schedule(CLEAN_TIME); … … 112 112 _updated = _context.clock().now(); 113 113 } 114 public int getRTT() { return _rtt; }115 public void setRTT(int ms) {114 public synchronized int getRTT() { return _rtt; } 115 public synchronized void setRTT(int ms) { 116 116 _rtt = (int)(RTT_DAMPENING*_rtt + (1-RTT_DAMPENING)*ms); 117 117 if (_rtt > MAX_RTT) … … 119 119 _updated = _context.clock().now(); 120 120 } 121 public int getWindowSize() { return _wdw; }122 public void setWindowSize(int wdw) {121 public synchronized int getWindowSize() { return _wdw; } 122 public synchronized void setWindowSize(int wdw) { 123 123 _wdw = (int)(0.5 + WDW_DAMPENING*_wdw + (1-WDW_DAMPENING)*wdw); 124 124 if (_wdw > MAX_WINDOW_SIZE) … … 126 126 _updated = _context.clock().now(); 127 127 } 128 public boolean isExpired() {128 public synchronized boolean isExpired() { 129 129 return _updated < _context.clock().now() - EXPIRE_TIME; 130 130 }
Note: See TracChangeset
for help on using the changeset viewer.