equal
deleted
inserted
replaced
98 * necessary here. |
98 * necessary here. |
99 */ |
99 */ |
100 private static final long serialVersionUID = -817911632652898426L; |
100 private static final long serialVersionUID = -817911632652898426L; |
101 |
101 |
102 /** The queued items */ |
102 /** The queued items */ |
|
103 @SuppressWarnings("serial") // Conditionally serializable |
103 final Object[] items; |
104 final Object[] items; |
104 |
105 |
105 /** items index for next take, poll, peek or remove */ |
106 /** items index for next take, poll, peek or remove */ |
106 int takeIndex; |
107 int takeIndex; |
107 |
108 |
118 |
119 |
119 /** Main lock guarding all access */ |
120 /** Main lock guarding all access */ |
120 final ReentrantLock lock; |
121 final ReentrantLock lock; |
121 |
122 |
122 /** Condition for waiting takes */ |
123 /** Condition for waiting takes */ |
|
124 @SuppressWarnings("serial") // Classes implementing Condition may be serializable. |
123 private final Condition notEmpty; |
125 private final Condition notEmpty; |
124 |
126 |
125 /** Condition for waiting puts */ |
127 /** Condition for waiting puts */ |
|
128 @SuppressWarnings("serial") // Classes implementing Condition may be serializable. |
126 private final Condition notFull; |
129 private final Condition notFull; |
127 |
130 |
128 /** |
131 /** |
129 * Shared state for currently active iterators, or null if there |
132 * Shared state for currently active iterators, or null if there |
130 * are known not to be any. Allows queue operations to update |
133 * are known not to be any. Allows queue operations to update |