*** empty log message ***
[mir.git] / source / mir / storage / store / StoreContainer.java
index f115e7a..acec906 100755 (executable)
@@ -96,11 +96,11 @@ public class StoreContainer {
     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);
@@ -146,7 +146,7 @@ public class StoreContainer {
    *  Description:  readjusts StoreContainer size to value.
    *
    */
-  public void setSize(int size) {
+  public synchronized void setSize(int size) {
     if (size < 0)
       return;
     shrinkToSize(size);
@@ -157,7 +157,7 @@ public class StoreContainer {
     shrinkToSize(maxSize);
   }
 
-  private void shrinkToSize(int size) {
+  private synchronized void shrinkToSize(int size) {
     if (size < container.size()) {
       // shrink
       while (size < container.size()) {