From 5bbf0101072f17422bf498cb0b5fad1b0dfe44cd Mon Sep 17 00:00:00 2001 From: orbiter Date: Sun, 18 Mar 2007 19:45:23 +0000 Subject: [PATCH] removed synchronization of size() method from numerous classes to avoid thread locking git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3490 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/index/indexCollectionRI.java | 2 +- source/de/anomic/index/indexRAMRI.java | 2 +- source/de/anomic/kelondro/kelondroCollectionIndex.java | 2 +- source/de/anomic/kelondro/kelondroFlexSplitTable.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/de/anomic/index/indexCollectionRI.java b/source/de/anomic/index/indexCollectionRI.java index f5562e390..e5badda6b 100644 --- a/source/de/anomic/index/indexCollectionRI.java +++ b/source/de/anomic/index/indexCollectionRI.java @@ -67,7 +67,7 @@ public class indexCollectionRI implements indexRI { return entries.updated(); } - public synchronized int size() { + public int size() { try { return collectionIndex.size(); } catch (IOException e) { diff --git a/source/de/anomic/index/indexRAMRI.java b/source/de/anomic/index/indexRAMRI.java index 8b28ee4ae..f24befe30 100644 --- a/source/de/anomic/index/indexRAMRI.java +++ b/source/de/anomic/index/indexRAMRI.java @@ -265,7 +265,7 @@ public final class indexRAMRI implements indexRI { return this.cacheMaxCount; } - public synchronized int size() { + public int size() { return cache.size(); } diff --git a/source/de/anomic/kelondro/kelondroCollectionIndex.java b/source/de/anomic/kelondro/kelondroCollectionIndex.java index 70a59e120..c54c03da6 100644 --- a/source/de/anomic/kelondro/kelondroCollectionIndex.java +++ b/source/de/anomic/kelondro/kelondroCollectionIndex.java @@ -272,7 +272,7 @@ public class kelondroCollectionIndex { } } - public synchronized int size() throws IOException { + public int size() throws IOException { return index.size(); } diff --git a/source/de/anomic/kelondro/kelondroFlexSplitTable.java b/source/de/anomic/kelondro/kelondroFlexSplitTable.java index 3fe941b47..73313e6e8 100644 --- a/source/de/anomic/kelondro/kelondroFlexSplitTable.java +++ b/source/de/anomic/kelondro/kelondroFlexSplitTable.java @@ -122,7 +122,7 @@ public class kelondroFlexSplitTable implements kelondroIndex { 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()) {