return null;
}
- public boolean has(StoreIdentifier sid) {
+ public synchronized boolean has(StoreIdentifier sid) {
return container.contains(sid);
}
- public void add(StoreIdentifier sid) {
+ public synchronized void add(StoreIdentifier sid) {
if (sid != null && sid.hasReference()) {
if (has(sid)) {
moveToHead(sid);
* Description: readjusts StoreContainer size to value.
*
*/
- public void setSize(int size) {
+ public synchronized void setSize(int size) {
if (size < 0)
return;
shrinkToSize(size);
shrinkToSize(maxSize);
}
- private void shrinkToSize(int size) {
+ private synchronized void shrinkToSize(int size) {
if (size < container.size()) {
// shrink
while (size < container.size()) {