[jboss-cvs] JBossAS SVN: r83076 - in trunk/server/src: main/org/jboss/deployment/vfs and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Jan 19 09:29:51 EST 2009
Author: alesj
Date: 2009-01-19 09:29:51 -0500 (Mon, 19 Jan 2009)
New Revision: 83076
Added:
trunk/server/src/main/org/jboss/deployment/vfs/VFSCacheOperations.java
trunk/server/src/main/org/jboss/deployment/vfs/VFSCacheOperationsMBean.java
Modified:
trunk/server/src/etc/deploy/vfs-jboss-beans.xml
trunk/server/src/main/org/jboss/deployment/vfs/VFSCacheStatisticsMBean.java
Log:
[JBAS-6395]; vfs cache operations mbean.
Modified: trunk/server/src/etc/deploy/vfs-jboss-beans.xml
===================================================================
--- trunk/server/src/etc/deploy/vfs-jboss-beans.xml 2009-01-19 13:49:04 UTC (rev 83075)
+++ trunk/server/src/etc/deploy/vfs-jboss-beans.xml 2009-01-19 14:29:51 UTC (rev 83076)
@@ -5,4 +5,8 @@
<annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.vfs:service=VFSCacheStatistics", exposedInterface=org.jboss.deployment.vfs.VFSCacheStatisticsMBean.class, registerDirectly=true)</annotation>
</bean>
+ <bean name="VFSCacheOperations" class="org.jboss.deployment.vfs.VFSCacheOperations">
+ <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.vfs:service=VFSCacheOperations", exposedInterface=org.jboss.deployment.vfs.VFSCacheOperationsMBean.class, registerDirectly=true)</annotation>
+ </bean>
+
</deployment>
Copied: trunk/server/src/main/org/jboss/deployment/vfs/VFSCacheOperations.java (from rev 83073, trunk/server/src/main/org/jboss/deployment/vfs/VFSCacheStatistics.java)
===================================================================
--- trunk/server/src/main/org/jboss/deployment/vfs/VFSCacheOperations.java (rev 0)
+++ trunk/server/src/main/org/jboss/deployment/vfs/VFSCacheOperations.java 2009-01-19 14:29:51 UTC (rev 83076)
@@ -0,0 +1,68 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.deployment.vfs;
+
+import org.jboss.virtual.spi.cache.VFSCache;
+import org.jboss.virtual.spi.cache.VFSCacheFactory;
+
+/**
+ * Simple vfs cache ops.
+ *
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class VFSCacheOperations implements VFSCacheOperationsMBean
+{
+ private VFSCache cache;
+
+ private VFSCache getCache()
+ {
+ if (cache == null)
+ cache = VFSCacheFactory.getInstance();
+
+ return cache;
+ }
+
+ /**
+ * Set the vfs cache.
+ *
+ * @param cache the vfs cache
+ */
+ public void setCache(VFSCache cache)
+ {
+ this.cache = cache;
+ }
+
+ public void start() throws Exception
+ {
+ getCache().start();
+ }
+
+ public void stop()
+ {
+ getCache().stop();
+ }
+
+ public void flush()
+ {
+ getCache().flush();
+ }
+}
\ No newline at end of file
Property changes on: trunk/server/src/main/org/jboss/deployment/vfs/VFSCacheOperations.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ native
Copied: trunk/server/src/main/org/jboss/deployment/vfs/VFSCacheOperationsMBean.java (from rev 83073, trunk/server/src/main/org/jboss/deployment/vfs/VFSCacheStatisticsMBean.java)
===================================================================
--- trunk/server/src/main/org/jboss/deployment/vfs/VFSCacheOperationsMBean.java (rev 0)
+++ trunk/server/src/main/org/jboss/deployment/vfs/VFSCacheOperationsMBean.java 2009-01-19 14:29:51 UTC (rev 83076)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.deployment.vfs;
+
+/**
+ * VFS cache ops mbean interface.
+ *
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public interface VFSCacheOperationsMBean
+{
+ /**
+ * Start the vfs cache.
+ *
+ * @throws Exception for any error
+ */
+ void start() throws Exception;
+
+ /**
+ * Stop the vfs cache.
+ */
+ void stop();
+
+ /**
+ * Flush the vfs cache.
+ */
+ void flush();
+}
\ No newline at end of file
Property changes on: trunk/server/src/main/org/jboss/deployment/vfs/VFSCacheOperationsMBean.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ native
Modified: trunk/server/src/main/org/jboss/deployment/vfs/VFSCacheStatisticsMBean.java
===================================================================
--- trunk/server/src/main/org/jboss/deployment/vfs/VFSCacheStatisticsMBean.java 2009-01-19 13:49:04 UTC (rev 83075)
+++ trunk/server/src/main/org/jboss/deployment/vfs/VFSCacheStatisticsMBean.java 2009-01-19 14:29:51 UTC (rev 83076)
@@ -24,6 +24,8 @@
import java.util.Date;
/**
+ * VFS cache stats mbean interface.
+ *
* @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
*/
public interface VFSCacheStatisticsMBean
More information about the jboss-cvs-commits
mailing list