Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r3214 - trunk/geant2_java-xml-ls/src/main/java/org/perfsonar/service/lookupService/xmlType

Subject: perfsonar development work

List archive

perfsonar: r3214 - trunk/geant2_java-xml-ls/src/main/java/org/perfsonar/service/lookupService/xmlType


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r3214 - trunk/geant2_java-xml-ls/src/main/java/org/perfsonar/service/lookupService/xmlType
  • Date: Fri, 11 Jan 2008 08:59:16 -0500

Author: mac
Date: 2008-01-11 08:59:16 -0500 (Fri, 11 Jan 2008)
New Revision: 3214

Modified:

trunk/geant2_java-xml-ls/src/main/java/org/perfsonar/service/lookupService/xmlType/LSCleanup.java

trunk/geant2_java-xml-ls/src/main/java/org/perfsonar/service/lookupService/xmlType/LSGenericRegisterAction.java
Log:
LSCleanup time in seconds. Time in DB in seconds (but still not in "time" tag)

Modified:
trunk/geant2_java-xml-ls/src/main/java/org/perfsonar/service/lookupService/xmlType/LSCleanup.java
===================================================================
---
trunk/geant2_java-xml-ls/src/main/java/org/perfsonar/service/lookupService/xmlType/LSCleanup.java
2008-01-11 13:58:27 UTC (rev 3213)
+++
trunk/geant2_java-xml-ls/src/main/java/org/perfsonar/service/lookupService/xmlType/LSCleanup.java
2008-01-11 13:59:16 UTC (rev 3214)
@@ -83,11 +83,11 @@

//input parameter request - unimportant

- long now = System.currentTimeMillis(); // current timestamp
- logger.debug("LSCleanup: cleanup action, timestamp="+now);
+ long now = System.currentTimeMillis() / 1000; // current timestamp
in sec
+ logger.debug("LSCleanup: cleanup action, timestamp="+now+"s");

//perform cleanup operation
- dao.cleanupLookupInfo(now, getLsTTLInMillis());
+ dao.cleanupLookupInfo(now, getLsTTLInSeconds());

//result usually unimportant, may be required if
//it was run not by Scheduler but by ServiceEngine
@@ -129,9 +129,9 @@
/**
* get LS TTL in milliseconds
*/
- private long getLsTTLInMillis() {
+ private long getLsTTLInSeconds() {

- return lsTTL * 1000; //because lsTTP is in seconds
+ return lsTTL; //because lsTTP is in seconds

}


Modified:
trunk/geant2_java-xml-ls/src/main/java/org/perfsonar/service/lookupService/xmlType/LSGenericRegisterAction.java
===================================================================
---
trunk/geant2_java-xml-ls/src/main/java/org/perfsonar/service/lookupService/xmlType/LSGenericRegisterAction.java
2008-01-11 13:58:27 UTC (rev 3213)
+++
trunk/geant2_java-xml-ls/src/main/java/org/perfsonar/service/lookupService/xmlType/LSGenericRegisterAction.java
2008-01-11 13:59:16 UTC (rev 3214)
@@ -31,14 +31,14 @@

/**
* Updates timestamp parameter in LSStorage-control schema
- * Sets it to current timestamp (System.currentTimeMillis())
+ * Sets it to current timestamp (System.currentTimeMillis() / 1000)
*/
protected long updateTime(String key)
throws PerfSONARException {

//get current time
- long now = System.currentTimeMillis();
- logger.debug("[LS Registration] Update time... ["+now+"]");
+ long now = System.currentTimeMillis() / 1000; //in seconds
+ logger.debug("[LS Registration] Update time... ["+now+" sec]");

//run setControlParameter, modify control schema of the LS
dao.setControlParameter(key, "timestamp", Long.toString(now));



  • perfsonar: r3214 - trunk/geant2_java-xml-ls/src/main/java/org/perfsonar/service/lookupService/xmlType, svnlog, 01/11/2008

Archive powered by MHonArc 2.6.16.

Top of Page