[MOBY-guts] biomoby commit
Martin Senger
senger at pub.open-bio.org
Mon Nov 21 17:46:04 UTC 2005
senger
Mon Nov 21 12:46:04 EST 2005
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client
In directory pub.open-bio.org:/tmp/cvs-serv10066/src/main/org/biomoby/client
Modified Files:
CentralDigestCachedImpl.java
Log Message:
moby-live/Java/src/main/org/biomoby/client CentralDigestCachedImpl.java,1.15,1.16
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java 2005/11/20 12:30:51 1.15
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java 2005/11/21 17:46:04 1.16
@@ -607,7 +607,7 @@
}
/**************************************************************************
- * Update namespaces from a moby registry - this easier than with
+ * Update namespaces from a moby registry - this is easier than with
* other entities: just get a new LIST_FILE.
*************************************************************************/
protected boolean fillNamespacesCache()
@@ -933,6 +933,7 @@
Properties result = new Properties();
result.put (CACHE_PROP_REGISTRY_URL, getRegistryEndpoint());
result.put (CACHE_PROP_COUNT, new Integer (0));
+ result.put (CACHE_PROP_SIZE, new Long (0));
if (cacheDir == null) return result;
String realName = null;
try {
@@ -969,8 +970,10 @@
ageOfOldest = Math.min (ageOfOldest, age);
}
}
- result.put (CACHE_PROP_COUNT, new Integer (realCount));
- result.put (CACHE_PROP_SIZE, new Long (realSize));
+ if (! CACHE_PART_NAMESPACES.equals (id)) {
+ result.put (CACHE_PROP_COUNT, new Integer (realCount));
+ result.put (CACHE_PROP_SIZE, new Long (realSize));
+ }
if (ageOfYoungest > 0)
result.put (CACHE_PROP_YOUNGEST, new Long (ageOfYoungest));
if (ageOfOldest < Long.MAX_VALUE)
@@ -987,7 +990,8 @@
StringBuffer buf = new StringBuffer();
buf.append (props.getProperty (CACHE_PROP_NAME) + "\n");
add (buf, "Biomoby registry", props.get (CACHE_PROP_REGISTRY_URL));
- add (buf, "Number of entities", props.get (CACHE_PROP_COUNT));
+ if ( ((Integer)props.get (CACHE_PROP_COUNT)).intValue() > 0 )
+ add (buf, "Number of entities", props.get (CACHE_PROP_COUNT));
Object value = props.get (CACHE_PROP_OLDEST);
if (value != null) {
long age = ((Long)value).longValue();
@@ -1000,7 +1004,8 @@
add (buf, "Youngest entry created", new Date (age));
add (buf, "Youngest entry has age", Utils.ms2Human (new Date().getTime() - age));
}
- add (buf, "Size (in bytes)", props.get (CACHE_PROP_SIZE));
+ if ( ((Long)props.get (CACHE_PROP_SIZE)).longValue() > 0 )
+ add (buf, "Size (in bytes)", props.get (CACHE_PROP_SIZE));
add (buf, "Location", props.get (CACHE_PROP_LOCATION));
return new String (buf);
}
More information about the MOBY-guts
mailing list