perfsonar-dev - perfsonar: r3092 - in branches/perfsonarui/src/org/perfsonar/perfsonarui: . ma/ui/actions ui ui/panels
Subject: perfsonar development work
List archive
perfsonar: r3092 - in branches/perfsonarui/src/org/perfsonar/perfsonarui: . ma/ui/actions ui ui/panels
Chronological Thread
- From:
- To:
- Subject: perfsonar: r3092 - in branches/perfsonarui/src/org/perfsonar/perfsonarui: . ma/ui/actions ui ui/panels
- Date: Wed, 5 Dec 2007 10:21:02 -0500
Author: nina
Date: 2007-12-05 10:21:01 -0500 (Wed, 05 Dec 2007)
New Revision: 3092
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/AbstractMARequest.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/SmartMARequest.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/actions/SetupDataRetrieveAllAction.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/PerfsonarModel.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/RequestOptionsPanel.java
Log:
maxRequests parameter renamed to maxDataEntries
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/AbstractMARequest.java
===================================================================
--- branches/perfsonarui/src/org/perfsonar/perfsonarui/AbstractMARequest.java
2007-12-05 15:19:58 UTC (rev 3091)
+++ branches/perfsonarui/src/org/perfsonar/perfsonarui/AbstractMARequest.java
2007-12-05 15:21:01 UTC (rev 3092)
@@ -124,7 +124,7 @@
propertyChangeSupport.firePropertyChange(new
PerfsonarResponseEvent(this, userData,result));
}
public synchronized void fireResultProcessingCompleted(IUserData
userData) {
- PSLogger.threadlog("---- " + getClass().getName() + "
fireResultProcessingCompleted ----");
+ //PSLogger.threadlog("---- " + getClass().getName() + "
fireResultProcessingCompleted ----");
propertyChangeSupport.firePropertyChange(new
PerfsonarResponseEvent(this,PerfsonarResponseEvent.COMMAND_PROCESSINGCOMPLETED,
userData, null));
}
/* (non-Javadoc)
@@ -319,12 +319,15 @@
SOAPEnvelope envelope = prepareEnvelope(requestMessage);
+ long now = System.currentTimeMillis();
if (envelope != null) {
resultObject = call.invoke(new Message(envelope));
//throw new Exception("AA not implemented! Have to
figure out why resultObject = call.invoke((SOAPEnvelope)envelope); does not
compile");
} else
resultObject = call.invoke(new Object[]
{requestMessage});
+ requestMessage = null;
+ logger.info("Axis call completed in
"+(System.currentTimeMillis()-now)+" ms.");
if (!isInterrupted()) {
logger.debug("request completed");
fireAxisCallCompleted(query);
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/SmartMARequest.java
===================================================================
--- branches/perfsonarui/src/org/perfsonar/perfsonarui/SmartMARequest.java
2007-12-05 15:19:58 UTC (rev 3091)
+++ branches/perfsonarui/src/org/perfsonar/perfsonarui/SmartMARequest.java
2007-12-05 15:21:01 UTC (rev 3092)
@@ -65,7 +65,7 @@
protected int requestsRunning = 0;
protected AbstractPerfsonarResponse propertyChangeListener;
Hashtable<IPerfsonarSchema, PerfsonarRequestsPool> requestsPool;
- protected int MaxRequests = 16;
+ protected int maxDataEntries = 16;
protected ICredentialsListener credentialsListener = null;
//PerfsonarRequestsPool[] requestsPool = null;
@@ -76,7 +76,7 @@
super();
propertyChangeListener = new AbstractPerfsonarResponse() {
public void process(IPerfsonarRequest
request,IUserData uData,Object response) throws Exception {
- PSLogger.threadlog(getClass().getName() + "
dummy processing");
+ //PSLogger.threadlog(getClass().getName() + "
SmartMARequest property change listener");
}
/**
* return
{@link
IPerfsonarRequest} object if processing is already completed
@@ -170,11 +170,11 @@
* @return
*/
public synchronized int isReady() {
- PSLogger.threadlog("--- isReady");
+ //PSLogger.threadlog("--- isReady");
while (getRequestsRunning() > 0) {
try {
//wait for requests to complete
- PSLogger.threadlog("--- wait");
+ //PSLogger.threadlog("--- wait");
wait();
} catch (InterruptedException e) {
@@ -182,7 +182,7 @@
}
}
propertyChangeListener.clear();
- PSLogger.threadlog("--- READY");
+ //PSLogger.threadlog("--- READY");
return getRequestsRunning();
}
public synchronized int getRequestsRunning() {
@@ -295,7 +295,7 @@
list.put(e.toString(),d);
}
d.add(data);
- if (d.size() >= MaxRequests) {
+ if (d.size() >= maxDataEntries) {
queries.add(d);
list.remove(e.toString());
}
@@ -446,12 +446,12 @@
return null;
}
- public int getMaxRequests() {
- return MaxRequests;
+ public int getMaxDataEntries() {
+ return maxDataEntries;
}
- public void setMaxRequests(int maxRequests) {
- if (maxRequests <= 0) maxRequests =1;
- MaxRequests = maxRequests;
+ public void setMaxDataEntries(int max) {
+ if (max <= 0) max =1;
+ maxDataEntries = max;
//System.out.println("Max " + maxRequests + " interfaces in one
query ");
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/actions/SetupDataRetrieveAllAction.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/actions/SetupDataRetrieveAllAction.java
2007-12-05 15:19:58 UTC (rev 3091)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/actions/SetupDataRetrieveAllAction.java
2007-12-05 15:21:01 UTC (rev 3092)
@@ -105,29 +105,31 @@
if (isInterrupted()) return null;
if (dataList.size() > 0) {
request.fireStatusMessage("Metadata
retrieved.");
+ for (int i=0; i < dataList.size();i++)
+
dataList.get(i).makeQueryFromResponse();
- if (isMetadataOnly()) return null;
- //long timeNow =
Calendar.getInstance(TimeZone.getDefault()).getTimeInMillis()/1000;
- for (int i=0; i < dataList.size();i++) {
- // responce --> query
-
dataList.get(i).makeQueryFromResponse();
-
//dataList.get(i).setTime(timeNow-dataList.getTimeInterval(),dataList.getTimeInterval());
- }
- dataList.setTimeInterval(timeInterval);
- request.fireStatusMessage("");
- if (!isInterrupted()) {
- super.run(arg0);
+ if (isMetadataOnly()) {
dataList.setNotificationEnabled(true);
dataList.setSelectedItemIndex(0);
IUserData d = dataList.get(0);
-
- if (d != null) {
+ if (d != null)
userData.assign(d);
- }
+ } else {
+
+
dataList.setTimeInterval(timeInterval);
+ request.fireStatusMessage("");
-
- } else logger.info("---- "+ this + " ---
INTERRUPTED");
+ if (!isInterrupted()) {
+ super.run(arg0);
+
dataList.setNotificationEnabled(true);
+
dataList.setSelectedItemIndex(0);
+ IUserData d = dataList.get(0);
+ if (d != null)
+ userData.assign(d);
+
+ } else logger.info("---- "+ this + "
--- INTERRUPTED");
+ }
} else request.fireStatusMessage("No metadata
found.");
return null;
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/PerfsonarModel.java
===================================================================
--- branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/PerfsonarModel.java
2007-12-05 15:19:58 UTC (rev 3091)
+++ branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/PerfsonarModel.java
2007-12-05 15:21:01 UTC (rev 3092)
@@ -109,6 +109,7 @@
protected static PSLogger logger = new PSLogger(PerfsonarModel.class);
public SmartMARequest request = null;
public static long timeIntervals[] = { //seconds
+ 15*60, //15 min
90*60, //90 min
8*60*60, //8h
24*60*60, //24h
@@ -120,6 +121,7 @@
24*30*24*60*60 //2 year
};
public static int timeResolution[] = { //seconds
+ 300, //90 min
300, //90 min
300, //8h
300, //24h
@@ -131,6 +133,7 @@
};
public static String timeIntervalsTitle[] = { //seconds
+ "Last 15 min",
"Last 90 min",
"Last 8 hours",
"Last 24 hours",
@@ -505,15 +508,15 @@
}
}
- int maxRequests = 8;
+ int maxDataEntries = 8;
if( line.hasOption( "a" ) ) {
try {
- maxRequests = Integer.parseInt(line.getOptionValue(
'a' ));
+ maxDataEntries =
Integer.parseInt(line.getOptionValue( 'a' ));
} catch (Exception x) {
- maxRequests = 8;
+ maxDataEntries = 8;
}
}
- request.setMaxRequests(maxRequests);
+ request.setMaxDataEntries(maxDataEntries);
int timeout = 300000;
if( line.hasOption( "t" ) )
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/RequestOptionsPanel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/RequestOptionsPanel.java
2007-12-05 15:19:58 UTC (rev 3091)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/RequestOptionsPanel.java
2007-12-05 15:21:01 UTC (rev 3092)
@@ -173,7 +173,7 @@
field_parallel.setSelected(getPsModel().getRequest().isParallel());
field_parallel.setToolTipText("If checked, the requests will be
sent in parallel threads, otherwise sequentially in one thread.");
- SpinnerModel model = new
SpinnerNumberModel(psModel.getRequest().getMaxRequests(), 1, 100, 1);
+ SpinnerModel model = new
SpinnerNumberModel(psModel.getRequest().getMaxDataEntries(), 1, 100, 1);
field_maxItems = new JSpinner(model);
field_maxItems.setToolTipText("Max number of queries in an
aggregated request");
field_maxItems.setMaximumSize(new
Dimension(Integer.MAX_VALUE,24));
@@ -181,7 +181,7 @@
public void stateChanged(ChangeEvent e) {
JSpinner spinner = (JSpinner)e.getSource();
Object value = spinner.getValue();
-
getPsModel().getRequest().setMaxRequests(((Integer)value).intValue());
+
getPsModel().getRequest().setMaxDataEntries(((Integer)value).intValue());
}
});
- perfsonar: r3092 - in branches/perfsonarui/src/org/perfsonar/perfsonarui: . ma/ui/actions ui ui/panels, svnlog, 12/05/2007
Archive powered by MHonArc 2.6.16.