[infinispan-commits] Infinispan SVN: r187 - in trunk: gui-demo and 4 other directories.
infinispan-commits at lists.jboss.org
infinispan-commits at lists.jboss.org
Tue Apr 28 08:10:01 EDT 2009
Author: manik.surtani at jboss.com
Date: 2009-04-28 08:10:01 -0400 (Tue, 28 Apr 2009)
New Revision: 187
Added:
trunk/gui-demo/src/main/resources/config-samples/
trunk/gui-demo/src/main/resources/config-samples/gui-demo-cache-config.xml
trunk/gui-demo/src/main/resources/runGuiDemo.sh
Removed:
trunk/gui-demo/src/main/resources/bin/
trunk/gui-demo/src/main/resources/config-samples/demo-cache-config.xml
trunk/gui-demo/src/main/resources/etc/
Modified:
trunk/core/pom.xml
trunk/gui-demo/pom.xml
trunk/gui-demo/src/main/java/org/infinispan/demo/InfinispanDemo.form
trunk/gui-demo/src/main/java/org/infinispan/demo/InfinispanDemo.java
trunk/src/main/resources/assemblies/all.xml
trunk/src/main/resources/assemblies/bin.xml
trunk/src/main/resources/assemblies/single_jar.xml
Log:
GUI demo + updated aggregator to package GUI demo
Modified: trunk/core/pom.xml
===================================================================
--- trunk/core/pom.xml 2009-04-28 11:56:08 UTC (rev 186)
+++ trunk/core/pom.xml 2009-04-28 12:10:01 UTC (rev 187)
@@ -42,21 +42,34 @@
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jboss-common-core</artifactId>
- <version>2.2.10.GA</version>
+ <version>2.2.13.GA</version>
</dependency>
-
+
<dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-common-core</artifactId>
+ <version>2.2.13.GA</version>
+ </dependency>
+
+ <!-- needed by JBoss Common Core -->
+ <dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-spi</artifactId>
+ <version>2.0.5.GA</version>
+ </dependency>
+
+ <dependency>
<groupId>org.jboss.marshalling</groupId>
- <artifactId>marshalling-api</artifactId>
+ <artifactId>marshalling-api</artifactId>
<version>1.1.2.GA</version>
</dependency>
-
+
<dependency>
<groupId>org.jboss.marshalling</groupId>
<artifactId>river</artifactId>
<version>1.1.2.GA</version>
</dependency>
-
+
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
Modified: trunk/gui-demo/pom.xml
===================================================================
--- trunk/gui-demo/pom.xml 2009-04-28 11:56:08 UTC (rev 186)
+++ trunk/gui-demo/pom.xml 2009-04-28 12:10:01 UTC (rev 187)
@@ -32,37 +32,10 @@
<artifactId>forms_rt</artifactId>
<version>6.0.5</version>
</dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.13</version>
- </dependency>
</dependencies>
<build>
<plugins>
- <!--<plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>2.2-beta-1</version>
- <executions>
- <execution>
- <id>assemble</id>
- <phase>install</phase>
- <goals>
- <goal>attached</goal>
- </goals>
- <configuration>
- <descriptors>
- <descriptor>assembly.xml</descriptor>
- </descriptors>
- <finalName>${artifactId}-${version}</finalName>
- <outputDirectory>target/distribution</outputDirectory>
- <workDirectory>target/assembly/work</workDirectory>
- </configuration>
- </execution>
- </executions>
- </plugin>
--->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>ideauidesigner-maven-plugin</artifactId>
Modified: trunk/gui-demo/src/main/java/org/infinispan/demo/InfinispanDemo.form
===================================================================
--- trunk/gui-demo/src/main/java/org/infinispan/demo/InfinispanDemo.form 2009-04-28 11:56:08 UTC (rev 186)
+++ trunk/gui-demo/src/main/java/org/infinispan/demo/InfinispanDemo.form 2009-04-28 12:10:01 UTC (rev 187)
@@ -217,21 +217,19 @@
<rowspec value="top:3dlu:noGrow"/>
<rowspec value="center:max(d;4px):noGrow"/>
<rowspec value="top:3dlu:noGrow"/>
- <rowspec value="center:max(d;4px):noGrow"/>
- <rowspec value="top:3dlu:noGrow"/>
<rowspec value="center:d:grow"/>
<rowspec value="top:3dlu:noGrow"/>
<rowspec value="center:max(d;4px):noGrow"/>
<rowspec value="top:3dlu:noGrow"/>
<rowspec value="center:max(d;4px):noGrow"/>
<rowspec value="top:3dlu:noGrow"/>
- <rowspec value="center:max(d;4px):noGrow"/>
- <rowspec value="top:3dlu:noGrow"/>
<rowspec value="center:d:grow"/>
<rowspec value="top:3dlu:noGrow"/>
<rowspec value="center:max(d;4px):noGrow"/>
<rowspec value="top:3dlu:noGrow"/>
<rowspec value="center:max(d;4px):noGrow"/>
+ <rowspec value="top:3dlu:noGrow"/>
+ <rowspec value="center:d:grow"/>
<colspec value="fill:d:noGrow"/>
<colspec value="left:4dlu:noGrow"/>
<colspec value="fill:200px:noGrow"/>
@@ -274,36 +272,10 @@
</grid>
<forms defaultalign-horz="false"/>
</constraints>
- <properties/>
- </component>
- <component id="ca2af" class="javax.swing.JRadioButton" binding="putEntryRadioButton">
- <constraints>
- <grid row="6" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
- <forms/>
- </constraints>
<properties>
- <selected value="true"/>
- <text value="&Put Entry"/>
+ <toolTipText value="Cached entry key"/>
</properties>
</component>
- <component id="e9453" class="javax.swing.JRadioButton" binding="removeEntryRadioButton">
- <constraints>
- <grid row="8" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
- <forms/>
- </constraints>
- <properties>
- <text value="&Remove Entry"/>
- </properties>
- </component>
- <component id="11f60" class="javax.swing.JButton" binding="goButton" default-binding="true">
- <constraints>
- <grid row="10" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
- <forms defaultalign-horz="false"/>
- </constraints>
- <properties>
- <text value="&Go"/>
- </properties>
- </component>
<component id="5eb9b" class="javax.swing.JTextField" binding="valueTextField" default-binding="true">
<constraints>
<grid row="4" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
@@ -311,7 +283,9 @@
</grid>
<forms defaultalign-horz="false"/>
</constraints>
- <properties/>
+ <properties>
+ <toolTipText value="Cached entry value"/>
+ </properties>
</component>
<component id="24ed" class="javax.swing.JLabel">
<constraints>
@@ -325,7 +299,7 @@
</component>
<component id="aacea" class="javax.swing.JLabel">
<constraints>
- <grid row="14" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+ <grid row="12" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
<forms/>
</constraints>
<properties>
@@ -333,118 +307,154 @@
<text value="Random data generator"/>
</properties>
</component>
- <component id="bf689" class="javax.swing.JSeparator">
- <constraints>
- <grid row="12" column="0" row-span="1" col-span="5" vsize-policy="6" hsize-policy="6" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
- <forms defaultalign-horz="false" defaultalign-vert="false"/>
- </constraints>
- <properties/>
- </component>
<component id="c9835" class="javax.swing.JLabel">
<constraints>
- <grid row="16" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+ <grid row="14" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
<forms/>
</constraints>
<properties>
- <labelFor value="513f3"/>
<text value="Max entries"/>
</properties>
</component>
- <component id="32377" class="javax.swing.JButton" binding="randomGeneratorButton">
+ <component id="43cf0" class="javax.swing.JButton" binding="cacheClearButton">
<constraints>
- <grid row="18" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+ <grid row="20" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
<forms defaultalign-horz="false"/>
</constraints>
<properties>
- <text value="Ge&nerate"/>
+ <text value="C&lear cache"/>
+ <toolTipText value="Clears all caches"/>
</properties>
</component>
- <component id="513f3" class="javax.swing.JTextField" binding="maxEntriesTextField">
+ <component id="dae1c" class="javax.swing.JLabel">
<constraints>
- <grid row="16" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
- <preferred-size width="150" height="-1"/>
- </grid>
- <forms defaultalign-horz="false"/>
+ <grid row="18" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+ <forms/>
</constraints>
- <properties/>
+ <properties>
+ <font style="3"/>
+ <text value="Clear cache"/>
+ </properties>
</component>
- <component id="f036" class="javax.swing.JSeparator">
+ <component id="402fc" class="javax.swing.JLabel">
<constraints>
- <grid row="20" column="0" row-span="1" col-span="5" vsize-policy="6" hsize-policy="6" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
- <forms defaultalign-horz="false" defaultalign-vert="false"/>
+ <grid row="8" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+ <forms/>
</constraints>
- <properties/>
+ <properties>
+ <text value="MaxIdle (millis)"/>
+ </properties>
</component>
- <component id="43cf0" class="javax.swing.JButton" binding="cacheClearButton">
+ <component id="6a9f0" class="javax.swing.JLabel">
<constraints>
- <grid row="24" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
- <forms defaultalign-horz="false"/>
+ <grid row="6" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+ <forms/>
</constraints>
<properties>
- <text value="C&lear cache"/>
+ <text value="Lifespan (millis)"/>
</properties>
</component>
- <component id="dae1c" class="javax.swing.JLabel">
+ <component id="ca2af" class="javax.swing.JRadioButton" binding="putEntryRadioButton">
<constraints>
- <grid row="22" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+ <grid row="2" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
<forms/>
</constraints>
<properties>
- <font style="3"/>
- <text value="Clear cache"/>
+ <selected value="true"/>
+ <text value="&Put Entry"/>
+ <toolTipText value="Adds a new entry or overwrites an existing one"/>
</properties>
</component>
<component id="f10d0" class="javax.swing.JRadioButton" binding="getEntryRadioButton" default-binding="true">
<constraints>
+ <grid row="4" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+ <forms/>
+ </constraints>
+ <properties>
+ <text value="&Get Entry"/>
+ <toolTipText value="Retrieves a cache entry, potentially from a remote cache"/>
+ </properties>
+ </component>
+ <component id="e9453" class="javax.swing.JRadioButton" binding="removeEntryRadioButton">
+ <constraints>
<grid row="6" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
<forms/>
</constraints>
<properties>
- <text value="Get Entry"/>
+ <text value="&Remove Entry"/>
+ <toolTipText value="Removes an entry from the cache"/>
</properties>
</component>
- </children>
- </grid>
- <grid id="ffd9b" binding="debugTab" layout-manager="GridLayoutManager" row-count="2" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
- <margin top="0" left="0" bottom="0" right="0"/>
- <constraints>
- <tabbedpane title="Debug" enabled="false"/>
- </constraints>
- <properties/>
- <border type="none"/>
- <children>
- <component id="cda62" class="javax.swing.JButton" binding="cacheDetailsButton">
+ <component id="11f60" class="javax.swing.JButton" binding="goButton" default-binding="true">
<constraints>
- <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
+ <grid row="8" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+ <forms defaultalign-horz="false"/>
</constraints>
<properties>
- <text value="Print cache details"/>
+ <text value="&Go"/>
+ <toolTipText value="Perform operation"/>
</properties>
</component>
- <component id="3a0c2" class="javax.swing.JButton" binding="cacheLockInfoButton">
+ <component id="32377" class="javax.swing.JButton" binding="randomGeneratorButton">
<constraints>
- <grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
+ <grid row="14" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+ <forms defaultalign-horz="false"/>
</constraints>
<properties>
- <text value="Print cache locking info"/>
+ <text value="Ge&nerate"/>
+ <toolTipText value="Generates random data"/>
</properties>
</component>
- <component id="7423b" class="javax.swing.JTextArea" binding="debugTextArea">
+ <component id="7a363" class="javax.swing.JSlider" binding="generateSlider">
<constraints>
- <grid row="1" column="0" row-span="1" col-span="3" vsize-policy="6" hsize-policy="6" anchor="0" fill="3" indent="0" use-parent-layout="false">
- <preferred-size width="150" height="50"/>
- </grid>
+ <grid row="14" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
+ <forms defaultalign-horz="false"/>
</constraints>
<properties>
- <background color="-3355444"/>
- <font name="Courier New" size="10"/>
+ <maximum value="1000"/>
+ <minimum value="1"/>
+ <minorTickSpacing value="100"/>
+ <paintLabels value="true"/>
+ <paintTicks value="true"/>
+ <valueIsAdjusting value="true"/>
</properties>
</component>
- <hspacer id="75f56">
+ <component id="1e4f0" class="javax.swing.JSpinner" binding="lifespanSpinner">
<constraints>
- <grid row="0" column="2" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
+ <grid row="6" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
+ <forms defaultalign-horz="false"/>
</constraints>
- </hspacer>
+ <properties>
+ <toolTipText value="Lifespan of the cache entry, in milliseconds. Defaults to what is declared in XML config. -1 is immortal."/>
+ </properties>
+ </component>
+ <component id="10b2a" class="javax.swing.JSpinner" binding="maxIdleSpinner">
+ <constraints>
+ <grid row="8" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
+ <forms defaultalign-horz="false"/>
+ </constraints>
+ <properties>
+ <toolTipText value="MaxIdle of the cache entry, in milliseconds. Defaults to what is declared in XML config. -1 is immortal."/>
+ </properties>
+ </component>
+ <vspacer id="de3e7">
+ <constraints>
+ <grid row="22" column="0" row-span="1" col-span="5" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
+ <forms defaultalign-vert="false"/>
+ </constraints>
+ </vspacer>
+ <vspacer id="3df43">
+ <constraints>
+ <grid row="16" column="0" row-span="1" col-span="5" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
+ <forms defaultalign-vert="false"/>
+ </constraints>
+ </vspacer>
+ <vspacer id="767c9">
+ <constraints>
+ <grid row="10" column="0" row-span="1" col-span="5" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
+ <forms defaultalign-vert="false"/>
+ </constraints>
+ </vspacer>
</children>
</grid>
</children>
Modified: trunk/gui-demo/src/main/java/org/infinispan/demo/InfinispanDemo.java
===================================================================
--- trunk/gui-demo/src/main/java/org/infinispan/demo/InfinispanDemo.java 2009-04-28 11:56:08 UTC (rev 186)
+++ trunk/gui-demo/src/main/java/org/infinispan/demo/InfinispanDemo.java 2009-04-28 12:10:01 UTC (rev 187)
@@ -16,6 +16,8 @@
import org.infinispan.remoting.transport.Address;
import javax.swing.*;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
import javax.swing.table.AbstractTableModel;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
@@ -26,13 +28,14 @@
import java.net.URL;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
+import java.util.Map;
import java.util.Random;
-import java.util.concurrent.BlockingQueue;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
-import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
/**
@@ -45,7 +48,6 @@
private JPanel panel1;
private JLabel cacheStatus;
private JPanel dataGeneratorTab;
- private JPanel statisticsTab;
private JPanel clusterViewTab;
private JPanel dataViewTab;
private JPanel controlPanelTab;
@@ -59,31 +61,26 @@
private JRadioButton removeEntryRadioButton;
private JRadioButton getEntryRadioButton;
private JButton goButton;
- private JScrollPane nodeDataScrollPane;
private JButton randomGeneratorButton;
- private JTextField maxEntriesTextField;
private JButton cacheClearButton;
private JTextArea configFileContents;
- private JScrollPane treeScrollPane;
- private JPanel debugTab;
- private JButton cacheDetailsButton;
- private JButton cacheLockInfoButton;
- private JTextArea debugTextArea;
private String cacheConfigFile;
private Cache<String, String> cache;
private String startCacheButtonLabel = "Start Cache", stopCacheButtonLabel = "Stop Cache";
private String statusStarting = "Starting Cache ... ", statusStarted = "Cache Running.", statusStopping = "Stopping Cache ...", statusStopped = "Cache Stopped.";
private ExecutorService asyncExecutor;
private final AtomicInteger updateCounter = new AtomicInteger(0);
- private BlockingQueue<Runnable> asyncTaskQueue;
private JTable dataTable;
private JButton refreshDataTableButton;
+ private JSlider generateSlider;
+ private JSpinner lifespanSpinner;
+ private JSpinner maxIdleSpinner;
private Random r = new Random();
private ClusterTableModel clusterTableModel;
private CachedDataTableModel cachedDataTableModel;
public static void main(String[] args) {
- String cfgFileName = System.getProperty("infinispan.demo.cfg", "etc/demo-cache-config.xml");
+ String cfgFileName = System.getProperty("infinispan.demo.cfg", "config-samples/gui-demo-cache-config.xml");
frame = new JFrame("Infinispan GUI Demo (STOPPED)");
frame.setContentPane(new InfinispanDemo(cfgFileName).panel1);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
@@ -94,7 +91,6 @@
public InfinispanDemo(String cfgFileName) {
asyncExecutor = Executors.newFixedThreadPool(1);
- asyncTaskQueue = ((ThreadPoolExecutor) asyncExecutor).getQueue();
cacheConfigFile = cfgFileName;
cacheStatusProgressBar.setVisible(false);
@@ -133,7 +129,7 @@
public void run() {
// based on the value of the radio button:
if (putEntryRadioButton.isSelected()) {
- cache.put(keyTextField.getText(), valueTextField.getText());
+ cache.put(keyTextField.getText(), valueTextField.getText(), lifespan(), TimeUnit.MILLISECONDS, maxIdle(), TimeUnit.MILLISECONDS);
} else if (removeEntryRadioButton.isSelected()) {
cache.remove(keyTextField.getText());
} else if (getEntryRadioButton.isSelected()) {
@@ -141,16 +137,41 @@
}
dataViewTab.repaint();
processAction(goButton, false);
+
+ // reset these values
+ lifespanSpinner.setValue(cache.getConfiguration().getExpirationLifespan());
+ maxIdleSpinner.setValue(cache.getConfiguration().getExpirationMaxIdle());
// now switch to the data pane
mainPane.setSelectedIndex(1);
}
+
+ private long lifespan() {
+ try {
+ String s = lifespanSpinner.getValue().toString();
+ return Long.parseLong(s);
+ } catch (Exception e) {
+ return cache.getConfiguration().getExpirationLifespan();
+ }
+ }
+
+ private long maxIdle() {
+ try {
+ String s = maxIdleSpinner.getValue().toString();
+ return Long.parseLong(s);
+ } catch (Exception e) {
+ return cache.getConfiguration().getExpirationMaxIdle();
+ }
+ }
});
}
});
+
removeEntryRadioButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
keyTextField.setEnabled(true);
valueTextField.setEnabled(false);
+ lifespanSpinner.setEnabled(false);
+ maxIdleSpinner.setEnabled(false);
}
});
@@ -158,6 +179,8 @@
public void actionPerformed(ActionEvent e) {
keyTextField.setEnabled(true);
valueTextField.setEnabled(true);
+ lifespanSpinner.setEnabled(true);
+ maxIdleSpinner.setEnabled(true);
}
});
@@ -165,9 +188,20 @@
public void actionPerformed(ActionEvent e) {
keyTextField.setEnabled(true);
valueTextField.setEnabled(false);
+ lifespanSpinner.setEnabled(false);
+ maxIdleSpinner.setEnabled(false);
}
});
+ generateSlider.addChangeListener(new ChangeListener() {
+
+ public void stateChanged(ChangeEvent e) {
+ randomGeneratorButton.setText("Generate " + generateSlider.getValue() + " Random Entries");
+ }
+ });
+
+ randomGeneratorButton.setText("Generate " + generateSlider.getValue() + " Random Entries");
+
randomGeneratorButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
processAction(randomGeneratorButton, true);
@@ -175,17 +209,15 @@
// process this asynchronously
asyncExecutor.execute(new Runnable() {
public void run() {
- int entries = 1;
- try {
- entries = Integer.parseInt(maxEntriesTextField.getText());
- }
- catch (NumberFormatException nfe) {
- log.warn("Entered a non-integer for depth. Using 1.", nfe);
- }
+ int entries = generateSlider.getValue();
- for (int i = 0; i < entries; i++) cache.put(randomString(), randomString());
+ Map<String, String> rand = new HashMap<String, String>();
+ while (rand.size() < entries) rand.put(randomString(), randomString());
+ cache.putAll(rand);
+
processAction(randomGeneratorButton, false);
+ generateSlider.setValue(50);
// now switch to the data pane
mainPane.setSelectedIndex(1);
}
@@ -223,17 +255,6 @@
});
}
});
-
- cacheDetailsButton.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- if (cache != null) debugTextArea.setText(cache.toString());
- }
- });
- cacheLockInfoButton.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- if (cache != null) debugTextArea.setText(cache.toString());
- }
- });
}
private void moveCacheToState(ComponentStatus state) {
@@ -314,9 +335,13 @@
cache.getCacheManager().addListener(cl);
updateClusterTable(cache.getCacheManager().getMembers());
+ lifespanSpinner.setValue(cache.getConfiguration().getExpirationLifespan());
+ maxIdleSpinner.setValue(cache.getConfiguration().getExpirationMaxIdle());
+
moveCacheToState(ComponentStatus.RUNNING);
} catch (Exception e) {
log.error("Unable to start cache!", e);
+ throw new RuntimeException(e);
}
}
});
Copied: trunk/gui-demo/src/main/resources/config-samples (from rev 182, trunk/gui-demo/src/main/resources/etc)
Deleted: trunk/gui-demo/src/main/resources/config-samples/demo-cache-config.xml
===================================================================
--- trunk/gui-demo/src/main/resources/etc/demo-cache-config.xml 2009-04-27 21:27:18 UTC (rev 182)
+++ trunk/gui-demo/src/main/resources/config-samples/demo-cache-config.xml 2009-04-28 12:10:01 UTC (rev 187)
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:infinispan:config:4.0">
- <global>
- <transport clusterName="demoCluster"/>
- </global>
-
- <default>
- <clustering mode="distribution">
- <l1 enabled="true" lifespan="10000"/>
- <hash numOwners="2"/>
- <sync/>
- </clustering>
- </default>
-</infinispan>
Added: trunk/gui-demo/src/main/resources/config-samples/gui-demo-cache-config.xml
===================================================================
--- trunk/gui-demo/src/main/resources/config-samples/gui-demo-cache-config.xml (rev 0)
+++ trunk/gui-demo/src/main/resources/config-samples/gui-demo-cache-config.xml 2009-04-28 12:10:01 UTC (rev 187)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:infinispan:config:4.0">
+ <global>
+ <transport clusterName="demoCluster"/>
+ </global>
+
+ <default>
+ <clustering mode="distribution">
+ <l1 enabled="true" lifespan="10000"/>
+ <hash numOwners="2"/>
+ <sync/>
+ </clustering>
+ </default>
+</infinispan>
Property changes on: trunk/gui-demo/src/main/resources/config-samples/gui-demo-cache-config.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: trunk/gui-demo/src/main/resources/runGuiDemo.sh (from rev 182, trunk/gui-demo/src/main/resources/bin/run.sh)
===================================================================
--- trunk/gui-demo/src/main/resources/runGuiDemo.sh (rev 0)
+++ trunk/gui-demo/src/main/resources/runGuiDemo.sh 2009-04-28 12:10:01 UTC (rev 187)
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+## TODO: A Windows .cmd version of this script!
+
+CP=./etc
+
+for i in modules/core/*.jar ; do
+ CP=${i}:${CP}
+done
+
+for i in modules/core/lib/*.jar ; do
+ CP=${i}:${CP}
+done
+
+for i in modules/gui-demo/*.jar ; do
+ CP=${i}:${CP}
+done
+
+for i in modules/gui-demo/lib/*.jar ; do
+ CP=${i}:${CP}
+done
+
+JVM_PARAMS="-Dbind.address=127.0.0.1 -Djava.net.preferIPv4Stack=true -Dlog4j.configuration=./etc/log4j.xml"
+
+java -cp ${CP} ${JVM_PARAMS} org.infinispan.demo.InfinispanDemo
Property changes on: trunk/gui-demo/src/main/resources/runGuiDemo.sh
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/src/main/resources/assemblies/all.xml
===================================================================
--- trunk/src/main/resources/assemblies/all.xml 2009-04-28 11:56:08 UTC (rev 186)
+++ trunk/src/main/resources/assemblies/all.xml 2009-04-28 12:10:01 UTC (rev 187)
@@ -22,124 +22,123 @@
+ doc (release notes, etc from src/main/release)
-->
<assembly
- xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
- <id>all</id>
+ xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+ <id>all</id>
- <formats>
- <format>zip</format>
- </formats>
+ <formats>
+ <format>zip</format>
+ </formats>
- <moduleSets>
- <moduleSet>
- <includeSubModules>false</includeSubModules>
+ <moduleSets>
+ <moduleSet>
+ <includeSubModules>false</includeSubModules>
- <sources>
- <includeModuleDirectory>false</includeModuleDirectory>
+ <sources>
+ <includeModuleDirectory>false</includeModuleDirectory>
- <fileSets>
+ <fileSets>
- <!-- resources -->
- <fileSet>
- <directory>src/main/resources</directory>
- <outputDirectory>etc</outputDirectory>
- <excludes>
- <exclude>**/*.sh</exclude>
- </excludes>
- </fileSet>
+ <!-- resources -->
+ <fileSet>
+ <directory>src/main/resources</directory>
+ <outputDirectory>etc</outputDirectory>
+ <excludes>
+ <exclude>**/*.sh</exclude>
+ </excludes>
+ </fileSet>
- <!-- Executable resources -->
- <fileSet>
- <directory>src/main/resources</directory>
- <outputDirectory>etc</outputDirectory>
- <includes>
- <include>**/*.sh</include>
- </includes>
- <fileMode>0777</fileMode>
- </fileSet>
+ <!-- Executable resources -->
+ <fileSet>
+ <directory>src/main/resources</directory>
+ <outputDirectory>bin</outputDirectory>
+ <includes>
+ <include>**/*.sh</include>
+ <include>**/*.bat</include>
+ <include>**/*.cmd</include>
+ <include>**/*.py</include>
+ </includes>
+ <fileMode>0777</fileMode>
+ </fileSet>
- <!-- Log4j XML -->
- <fileSet>
- <directory>src/test/resources</directory>
- <outputDirectory>etc</outputDirectory>
- <includes>
- <include>log4j.xml</include>
- </includes>
- </fileSet>
+ <!-- Log4j XML -->
+ <fileSet>
+ <directory>src/test/resources</directory>
+ <outputDirectory>etc</outputDirectory>
+ <includes>
+ <include>log4j.xml</include>
+ </includes>
+ </fileSet>
- <!-- EULAs and license files -->
- <fileSet>
- <directory>src/main/release</directory>
- <outputDirectory></outputDirectory>
- <includes>
- <include>**/*.txt</include>
- </includes>
- </fileSet>
+ <!-- EULAs and license files -->
+ <fileSet>
+ <directory>src/main/release</directory>
+ <outputDirectory></outputDirectory>
+ <includes>
+ <include>**/*.txt</include>
+ </includes>
+ </fileSet>
- <fileSet>
- <directory>target/docbook</directory>
- <outputDirectory>doc/</outputDirectory>
- </fileSet>
- </fileSets>
+ </fileSets>
- </sources>
+ </sources>
- <binaries>
+ <binaries>
- <outputDirectory>modules/${module.basedir.name}</outputDirectory>
- <outputFileNameMapping>
- ${module.artifactId}.${module.extension}
- </outputFileNameMapping>
- <unpack>false</unpack>
+ <outputDirectory>modules/${module.basedir.name}</outputDirectory>
+ <outputFileNameMapping>
+ ${module.artifactId}.${module.extension}
+ </outputFileNameMapping>
+ <unpack>false</unpack>
- <dependencySets>
- <dependencySet>
- <excludes>
- <exclude>infinispan-core*</exclude>
- </excludes>
- <useTransitiveDependencies>false</useTransitiveDependencies>
- <outputDirectory>modules/${module.basedir.name}/lib</outputDirectory>
- </dependencySet>
- </dependencySets>
+ <dependencySets>
+ <dependencySet>
+ <excludes>
+ <exclude>infinispan-core*</exclude>
+ </excludes>
+ <useTransitiveDependencies>false</useTransitiveDependencies>
+ <outputDirectory>modules/${module.basedir.name}/lib</outputDirectory>
+ </dependencySet>
+ </dependencySets>
- </binaries>
- </moduleSet>
+ </binaries>
+ </moduleSet>
- <moduleSet>
- <includeSubModules>false</includeSubModules>
- <binaries>
- <attachmentClassifier>tests</attachmentClassifier>
- <outputDirectory>test/modules/${module.basedir.name}</outputDirectory>
- <outputFileNameMapping>
- ${module.artifactId}-test.${module.extension}
- </outputFileNameMapping>
- <unpack>false</unpack>
+ <moduleSet>
+ <includeSubModules>false</includeSubModules>
+ <binaries>
+ <attachmentClassifier>tests</attachmentClassifier>
+ <outputDirectory>test/modules/${module.basedir.name}</outputDirectory>
+ <outputFileNameMapping>
+ ${module.artifactId}-test.${module.extension}
+ </outputFileNameMapping>
+ <unpack>false</unpack>
- <dependencySets>
- <dependencySet>
- <scope>test</scope>
- <excludes>
- <exclude>infinispan-core*</exclude>
- </excludes>
- <useTransitiveDependencies>false</useTransitiveDependencies>
- <outputDirectory>test/modules/${module.basedir.name}/lib</outputDirectory>
- </dependencySet>
- </dependencySets>
+ <dependencySets>
+ <dependencySet>
+ <scope>test</scope>
+ <excludes>
+ <exclude>infinispan-core*</exclude>
+ </excludes>
+ <useTransitiveDependencies>false</useTransitiveDependencies>
+ <outputDirectory>test/modules/${module.basedir.name}/lib</outputDirectory>
+ </dependencySet>
+ </dependencySets>
- </binaries>
- </moduleSet>
+ </binaries>
+ </moduleSet>
- </moduleSets>
+ </moduleSets>
- <fileSets>
+ <fileSets>
- <!-- docs -->
- <fileSet>
- <directory>target/site/apidocs</directory>
- <outputDirectory>doc/apidocs</outputDirectory>
- </fileSet>
+ <!-- docs -->
+ <fileSet>
+ <directory>target/site/apidocs</directory>
+ <outputDirectory>doc/apidocs</outputDirectory>
+ </fileSet>
- </fileSets>
+ </fileSets>
</assembly>
\ No newline at end of file
Modified: trunk/src/main/resources/assemblies/bin.xml
===================================================================
--- trunk/src/main/resources/assemblies/bin.xml 2009-04-28 11:56:08 UTC (rev 186)
+++ trunk/src/main/resources/assemblies/bin.xml 2009-04-28 12:10:01 UTC (rev 187)
@@ -16,99 +16,102 @@
+ doc (release notes, etc from src/main/release)
-->
<assembly
- xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
- <id>bin</id>
+ xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+ <id>bin</id>
- <formats>
- <format>zip</format>
- </formats>
+ <formats>
+ <format>zip</format>
+ </formats>
- <moduleSets>
- <moduleSet>
- <includeSubModules>false</includeSubModules>
+ <moduleSets>
+ <moduleSet>
+ <includeSubModules>false</includeSubModules>
- <sources>
- <includeModuleDirectory>false</includeModuleDirectory>
+ <sources>
+ <includeModuleDirectory>false</includeModuleDirectory>
- <fileSets>
+ <fileSets>
- <!-- resources -->
- <fileSet>
- <directory>src/main/resources</directory>
- <outputDirectory>etc</outputDirectory>
- <excludes>
- <exclude>**/*.sh</exclude>
- </excludes>
- </fileSet>
+ <!-- resources -->
+ <fileSet>
+ <directory>src/main/resources</directory>
+ <outputDirectory>etc</outputDirectory>
+ <excludes>
+ <exclude>**/*.sh</exclude>
+ </excludes>
+ </fileSet>
- <!-- Executable resources -->
- <fileSet>
- <directory>src/main/resources</directory>
- <outputDirectory>etc</outputDirectory>
- <includes>
- <include>**/*.sh</include>
- </includes>
- <fileMode>0777</fileMode>
- </fileSet>
+ <!-- Executable resources -->
+ <fileSet>
+ <directory>src/main/resources</directory>
+ <outputDirectory>bin</outputDirectory>
+ <includes>
+ <include>**/*.sh</include>
+ <include>**/*.bat</include>
+ <include>**/*.cmd</include>
+ <include>**/*.py</include>
+ </includes>
+ <fileMode>0777</fileMode>
+ </fileSet>
- <!-- Log4j XML -->
- <fileSet>
- <directory>src/test/resources</directory>
- <outputDirectory>etc</outputDirectory>
- <includes>
- <include>log4j.xml</include>
- </includes>
- </fileSet>
+ <!-- Log4j XML -->
+ <fileSet>
+ <directory>src/test/resources</directory>
+ <outputDirectory>etc</outputDirectory>
+ <includes>
+ <include>log4j.xml</include>
+ </includes>
+ </fileSet>
- <!-- EULAs and license files -->
- <fileSet>
- <directory>src/main/release</directory>
- <outputDirectory></outputDirectory>
- <includes>
- <include>**/*.txt</include>
- </includes>
- </fileSet>
+ <!-- EULAs and license files -->
+ <fileSet>
+ <directory>src/main/release</directory>
+ <outputDirectory></outputDirectory>
+ <includes>
+ <include>**/*.txt</include>
+ </includes>
+ </fileSet>
- <fileSet>
- <directory>target/docbook</directory>
- <outputDirectory>doc/</outputDirectory>
- </fileSet>
- </fileSets>
+ <fileSet>
+ <directory>target/docbook</directory>
+ <outputDirectory>doc/</outputDirectory>
+ </fileSet>
+ </fileSets>
- </sources>
+ </sources>
- <binaries>
+ <binaries>
- <outputDirectory>modules/${module.basedir.name}</outputDirectory>
- <unpack>false</unpack>
- <outputFileNameMapping>
- ${module.artifactId}.${module.extension}
- </outputFileNameMapping>
- <dependencySets>
- <dependencySet>
- <excludes>
- <exclude>infinispan-core*</exclude>
- </excludes>
- <useTransitiveDependencies>false</useTransitiveDependencies>
- <outputDirectory>modules/${module.basedir.name}/lib</outputDirectory>
- </dependencySet>
- </dependencySets>
+ <outputDirectory>modules/${module.basedir.name}</outputDirectory>
+ <unpack>false</unpack>
+ <outputFileNameMapping>
+ ${module.artifactId}.${module.extension}
+ </outputFileNameMapping>
+ <dependencySets>
+ <dependencySet>
+ <excludes>
+ <exclude>infinispan-core*</exclude>
+ </excludes>
+ <useTransitiveDependencies>false</useTransitiveDependencies>
+ <outputDirectory>modules/${module.basedir.name}/lib</outputDirectory>
+ </dependencySet>
+ </dependencySets>
- </binaries>
- </moduleSet>
+ </binaries>
+ </moduleSet>
- </moduleSets>
+ </moduleSets>
- <fileSets>
+ <fileSets>
- <!-- docs -->
- <fileSet>
- <directory>target/site/apidocs</directory>
- <outputDirectory>doc/apidocs</outputDirectory>
- </fileSet>
+ <!-- docs -->
+ <fileSet>
+ <directory>target/site/apidocs</directory>
+ <outputDirectory>doc/apidocs</outputDirectory>
+ </fileSet>
- </fileSets>
+ </fileSets>
</assembly>
Modified: trunk/src/main/resources/assemblies/single_jar.xml
===================================================================
--- trunk/src/main/resources/assemblies/single_jar.xml 2009-04-28 11:56:08 UTC (rev 186)
+++ trunk/src/main/resources/assemblies/single_jar.xml 2009-04-28 12:10:01 UTC (rev 187)
@@ -11,98 +11,99 @@
+ doc (release notes, etc from src/main/release)
-->
<assembly
- xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
- <id>single_jar</id>
+ xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+ <id>single_jar</id>
- <formats>
- <format>zip</format>
- </formats>
+ <formats>
+ <format>zip</format>
+ </formats>
- <moduleSets>
- <moduleSet>
- <includeSubModules>false</includeSubModules>
+ <moduleSets>
+ <moduleSet>
+ <includeSubModules>false</includeSubModules>
- <sources>
- <includeModuleDirectory>false</includeModuleDirectory>
+ <sources>
+ <includeModuleDirectory>false</includeModuleDirectory>
- <fileSets>
+ <fileSets>
- <!-- resources -->
- <fileSet>
- <directory>src/main/resources</directory>
- <outputDirectory>etc</outputDirectory>
- <excludes>
- <exclude>**/*.sh</exclude>
- </excludes>
- </fileSet>
+ <!-- resources -->
+ <fileSet>
+ <directory>src/main/resources</directory>
+ <outputDirectory>etc</outputDirectory>
+ <excludes>
+ <exclude>**/*.sh</exclude>
+ </excludes>
+ </fileSet>
- <!-- Executable resources -->
- <fileSet>
- <directory>src/main/resources</directory>
- <outputDirectory>etc</outputDirectory>
- <includes>
- <include>**/*.sh</include>
- </includes>
- <fileMode>0777</fileMode>
- </fileSet>
+ <!-- Executable resources -->
+ <fileSet>
+ <directory>src/main/resources</directory>
+ <outputDirectory>bin</outputDirectory>
+ <includes>
+ <include>**/*.sh</include>
+ <include>**/*.bat</include>
+ <include>**/*.cmd</include>
+ <include>**/*.py</include>
+ </includes>
+ <excludes>
+ <exclude>**/runGuiDemo*</exclude>
+ </excludes>
+ <fileMode>0777</fileMode>
+ </fileSet>
- <!-- Log4j XML -->
- <fileSet>
- <directory>src/test/resources</directory>
- <outputDirectory>etc</outputDirectory>
- <includes>
- <include>log4j.xml</include>
- </includes>
- </fileSet>
+ <!-- Log4j XML -->
+ <fileSet>
+ <directory>src/test/resources</directory>
+ <outputDirectory>etc</outputDirectory>
+ <includes>
+ <include>log4j.xml</include>
+ </includes>
+ </fileSet>
- <!-- EULAs and license files -->
- <fileSet>
- <directory>src/main/release</directory>
- <outputDirectory></outputDirectory>
- <includes>
- <include>**/*.txt</include>
- </includes>
- </fileSet>
+ <!-- EULAs and license files -->
+ <fileSet>
+ <directory>src/main/release</directory>
+ <outputDirectory></outputDirectory>
+ <includes>
+ <include>**/*.txt</include>
+ </includes>
+ </fileSet>
+ </fileSets>
- <fileSet>
- <directory>target/docbook</directory>
- <outputDirectory>doc/</outputDirectory>
- </fileSet>
- </fileSets>
+ </sources>
- </sources>
+ <binaries>
+ <unpack>false</unpack>
+ <!-- TODO do not insert the project jar itself, only the deps -->
+ <outputDirectory>/.ignore</outputDirectory>
+ <dependencySets>
+ <dependencySet>
+ <excludes>
+ <exclude>infinispan-*</exclude>
+ </excludes>
+ <outputDirectory>lib</outputDirectory>
+ </dependencySet>
+ </dependencySets>
+ </binaries>
+ </moduleSet>
- <binaries>
- <unpack>false</unpack>
- <!-- TODO do not insert the project jar itself, only the deps -->
- <outputDirectory>/.ignore</outputDirectory>
- <dependencySets>
- <dependencySet>
- <excludes>
- <exclude>infinispan-*</exclude>
- </excludes>
- <outputDirectory>lib</outputDirectory>
- </dependencySet>
- </dependencySets>
- </binaries>
- </moduleSet>
+ </moduleSets>
+ <fileSets>
+ <fileSet>
+ <directory>target</directory>
+ <includes>
+ <include>infinispan-all.jar</include>
+ </includes>
+ <outputDirectory>/</outputDirectory>
+ </fileSet>
- </moduleSets>
- <fileSets>
- <fileSet>
- <directory>target</directory>
- <includes>
- <include>infinispan-all.jar</include>
- </includes>
- <outputDirectory>/</outputDirectory>
- </fileSet>
-
- <!-- docs -->
- <fileSet>
- <directory>target/site/apidocs</directory>
- <outputDirectory>doc/apidocs</outputDirectory>
- </fileSet>
- </fileSets>
+ <!-- docs -->
+ <fileSet>
+ <directory>target/site/apidocs</directory>
+ <outputDirectory>doc/apidocs</outputDirectory>
+ </fileSet>
+ </fileSets>
</assembly>
More information about the infinispan-commits
mailing list