[jboss-cvs] JBossAS SVN: r107089 - in projects/cluster/ha-server-ispn/trunk: src/main/java/org/jboss/ha/ispn and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Jul 26 15:58:35 EDT 2010
Author: pferraro
Date: 2010-07-26 15:58:34 -0400 (Mon, 26 Jul 2010)
New Revision: 107089
Added:
projects/cluster/ha-server-ispn/trunk/src/main/java/org/jboss/ha/ispn/tree/
projects/cluster/ha-server-ispn/trunk/src/main/java/org/jboss/ha/ispn/tree/DefaultTreeCacheFactory.java
projects/cluster/ha-server-ispn/trunk/src/main/java/org/jboss/ha/ispn/tree/TreeCacheFactory.java
Modified:
projects/cluster/ha-server-ispn/trunk/pom.xml
Log:
Add facade for creating TreeCache instances
Modified: projects/cluster/ha-server-ispn/trunk/pom.xml
===================================================================
--- projects/cluster/ha-server-ispn/trunk/pom.xml 2010-07-26 19:17:18 UTC (rev 107088)
+++ projects/cluster/ha-server-ispn/trunk/pom.xml 2010-07-26 19:58:34 UTC (rev 107089)
@@ -69,6 +69,18 @@
</exclusion>
</exclusions>
</dependency>
+
+ <dependency>
+ <groupId>org.infinispan</groupId>
+ <artifactId>infinispan-tree</artifactId>
+ <version>${version.infinispan}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
<!-- Provided (by the container) dependencies -->
<dependency>
@@ -91,6 +103,18 @@
<version>${version.easymock}</version>
<scope>test</scope>
</dependency>
+ <!--dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-kernel</artifactId>
+ <version>2.0.9.GA</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-spi</artifactId>
+ <version>2.2.0.Alpha6</version>
+ <scope>test</scope>
+ </dependency-->
</dependencies>
Added: projects/cluster/ha-server-ispn/trunk/src/main/java/org/jboss/ha/ispn/tree/DefaultTreeCacheFactory.java
===================================================================
--- projects/cluster/ha-server-ispn/trunk/src/main/java/org/jboss/ha/ispn/tree/DefaultTreeCacheFactory.java (rev 0)
+++ projects/cluster/ha-server-ispn/trunk/src/main/java/org/jboss/ha/ispn/tree/DefaultTreeCacheFactory.java 2010-07-26 19:58:34 UTC (rev 107089)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.ha.ispn.tree;
+
+import org.infinispan.Cache;
+import org.infinispan.tree.TreeCache;
+
+/**
+ * @author Paul Ferraro
+ */
+public class DefaultTreeCacheFactory implements TreeCacheFactory
+{
+ private final org.infinispan.tree.TreeCacheFactory factory = new org.infinispan.tree.TreeCacheFactory();
+
+ @Override
+ public <K, V> TreeCache<K, V> createTreeCache(Cache<K, V> cache)
+ {
+ return this.factory.createTreeCache(cache);
+ }
+}
Added: projects/cluster/ha-server-ispn/trunk/src/main/java/org/jboss/ha/ispn/tree/TreeCacheFactory.java
===================================================================
--- projects/cluster/ha-server-ispn/trunk/src/main/java/org/jboss/ha/ispn/tree/TreeCacheFactory.java (rev 0)
+++ projects/cluster/ha-server-ispn/trunk/src/main/java/org/jboss/ha/ispn/tree/TreeCacheFactory.java 2010-07-26 19:58:34 UTC (rev 107089)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.ha.ispn.tree;
+
+import org.infinispan.Cache;
+import org.infinispan.tree.TreeCache;
+
+/**
+ * @author Paul Ferraro
+ */
+public interface TreeCacheFactory
+{
+ /**
+ * Creates a new tree cache backed by the specified cache
+ * @param <K> the cache key type
+ * @param <V> the cache value type
+ * @param cache an infinispan cache
+ * @return an infinispan tree cache
+ */
+ <K, V> TreeCache<K, V> createTreeCache(Cache<K, V> cache);
+}
More information about the jboss-cvs-commits
mailing list