Skip to content

Commit

Permalink
removed synchronization of size() method from numerous classes to avo…
Browse files Browse the repository at this point in the history
…id thread locking

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3490 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
orbiter committed Mar 18, 2007
1 parent 6b9eea3 commit 5bbf010
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion source/de/anomic/index/indexCollectionRI.java
Expand Up @@ -67,7 +67,7 @@ public long getUpdateTime(String wordHash) {
return entries.updated();
}

public synchronized int size() {
public int size() {
try {
return collectionIndex.size();
} catch (IOException e) {
Expand Down
2 changes: 1 addition & 1 deletion source/de/anomic/index/indexRAMRI.java
Expand Up @@ -265,7 +265,7 @@ public int getMaxWordCount() {
return this.cacheMaxCount;
}

public synchronized int size() {
public int size() {
return cache.size();
}

Expand Down
2 changes: 1 addition & 1 deletion source/de/anomic/kelondro/kelondroCollectionIndex.java
Expand Up @@ -272,7 +272,7 @@ private int arrayIndex(int requestedCapacity) throws kelondroOutOfLimitsExceptio
}
}

public synchronized int size() throws IOException {
public int size() throws IOException {
return index.size();
}

Expand Down
2 changes: 1 addition & 1 deletion source/de/anomic/kelondro/kelondroFlexSplitTable.java
Expand Up @@ -122,7 +122,7 @@ public static final String dateSuffix(Date date) {
return new String(suffix);
}

public synchronized int size() throws IOException {
public int size() throws IOException {
Iterator i = tables.values().iterator();
int s = 0;
while (i.hasNext()) {
Expand Down

0 comments on commit 5bbf010

Please sign in to comment.