Mercurial Hosting > luan
comparison src/org/eclipse/jetty/io/AbstractBuffer.java @ 1030:80cad9086593
remove Buffer.isVolatile()
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 03 Nov 2016 01:10:09 -0600 |
parents | 4e5e9e3c25b3 |
children | 921c25a05eaa |
comparison
equal
deleted
inserted
replaced
1029:4e5e9e3c25b3 | 1030:80cad9086593 |
---|---|
42 __READONLY = "READONLY", | 42 __READONLY = "READONLY", |
43 __READWRITE = "READWRITE", | 43 __READWRITE = "READWRITE", |
44 __VOLATILE = "VOLATILE"; | 44 __VOLATILE = "VOLATILE"; |
45 | 45 |
46 protected int _access; | 46 protected int _access; |
47 protected boolean _volatile; | |
48 | 47 |
49 protected int _get; | 48 protected int _get; |
50 protected int _put; | 49 protected int _put; |
51 protected int _hash; | 50 protected int _hash; |
52 protected int _hashGet; | 51 protected int _hashGet; |
58 /** | 57 /** |
59 * Constructor for BufferView | 58 * Constructor for BufferView |
60 * | 59 * |
61 * @param access 0==IMMUTABLE, 1==READONLY, 2==READWRITE | 60 * @param access 0==IMMUTABLE, 1==READONLY, 2==READWRITE |
62 */ | 61 */ |
63 public AbstractBuffer(int access, boolean isVolatile) | 62 protected AbstractBuffer(int access) |
64 { | 63 { |
65 if (access == IMMUTABLE && isVolatile) | 64 // if (access == IMMUTABLE && isVolatile) |
66 throw new IllegalArgumentException("IMMUTABLE && VOLATILE"); | 65 // throw new IllegalArgumentException("IMMUTABLE && VOLATILE"); |
67 setMarkIndex(-1); | 66 setMarkIndex(-1); |
68 _access = access; | 67 _access = access; |
69 _volatile = isVolatile; | |
70 } | 68 } |
71 | 69 |
72 /* | 70 /* |
73 * @see org.eclipse.io.Buffer#toArray() | 71 * @see org.eclipse.io.Buffer#toArray() |
74 */ | 72 */ |
245 public boolean isReadOnly() | 243 public boolean isReadOnly() |
246 { | 244 { |
247 return _access <= READONLY; | 245 return _access <= READONLY; |
248 } | 246 } |
249 | 247 |
250 public boolean isVolatile() | |
251 { | |
252 return _volatile; | |
253 } | |
254 | |
255 public int length() | 248 public int length() |
256 { | 249 { |
257 return _put - _get; | 250 return _put - _get; |
258 } | 251 } |
259 | 252 |