[jboss-cvs] JBossAS SVN: r80084 - projects/ejb3/dev/Branch_JBoss_Cache_3/core/src/main/java/org/jboss/ejb3/cache/tree.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sun Oct 26 14:17:04 EDT 2008
Author: bstansberry at jboss.com
Date: 2008-10-26 14:17:03 -0400 (Sun, 26 Oct 2008)
New Revision: 80084
Removed:
projects/ejb3/dev/Branch_JBoss_Cache_3/core/src/main/java/org/jboss/ejb3/cache/tree/PassivationCacheLoader.java
projects/ejb3/dev/Branch_JBoss_Cache_3/core/src/main/java/org/jboss/ejb3/cache/tree/PassivationEvictionPolicy.java
projects/ejb3/dev/Branch_JBoss_Cache_3/core/src/main/java/org/jboss/ejb3/cache/tree/SFSBFileCacheLoader.java
projects/ejb3/dev/Branch_JBoss_Cache_3/core/src/main/java/org/jboss/ejb3/cache/tree/StatefulCacheLoader.java
projects/ejb3/dev/Branch_JBoss_Cache_3/core/src/main/java/org/jboss/ejb3/cache/tree/StatefulEvictionPolicy.java
Log:
Prune unused cache loader and eviction policy impl
Deleted: projects/ejb3/dev/Branch_JBoss_Cache_3/core/src/main/java/org/jboss/ejb3/cache/tree/PassivationCacheLoader.java
===================================================================
--- projects/ejb3/dev/Branch_JBoss_Cache_3/core/src/main/java/org/jboss/ejb3/cache/tree/PassivationCacheLoader.java 2008-10-26 18:12:21 UTC (rev 80083)
+++ projects/ejb3/dev/Branch_JBoss_Cache_3/core/src/main/java/org/jboss/ejb3/cache/tree/PassivationCacheLoader.java 2008-10-26 18:17:03 UTC (rev 80084)
@@ -1,52 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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.ejb3.cache.tree;
-
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import org.jboss.cache.Fqn;
-import org.jboss.cache.loader.FileCacheLoader;
-import org.jboss.ejb3.stateful.StatefulBeanContext;
-import org.jboss.system.server.ServerConfig;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @deprecated Use direct JBossCache passivation now.
- * @version $Revision$
- */
-public class PassivationCacheLoader extends FileCacheLoader
-{
- public Map get(Fqn fqn) throws Exception
- {
- Map map = super.get(fqn);
-
- if (map == null)
- return new java.util.HashMap();
-
- return map;
- }
-}
Deleted: projects/ejb3/dev/Branch_JBoss_Cache_3/core/src/main/java/org/jboss/ejb3/cache/tree/PassivationEvictionPolicy.java
===================================================================
--- projects/ejb3/dev/Branch_JBoss_Cache_3/core/src/main/java/org/jboss/ejb3/cache/tree/PassivationEvictionPolicy.java 2008-10-26 18:12:21 UTC (rev 80083)
+++ projects/ejb3/dev/Branch_JBoss_Cache_3/core/src/main/java/org/jboss/ejb3/cache/tree/PassivationEvictionPolicy.java 2008-10-26 18:17:03 UTC (rev 80084)
@@ -1,44 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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.ejb3.cache.tree;
-
-import org.jboss.cache.Fqn;
-import org.jboss.cache.eviction.LRUPolicy;
-import org.jboss.logging.Logger;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @deprecated Use direct JBossCache passivation now.
- * @version $Revision$
- */
-public class PassivationEvictionPolicy extends LRUPolicy
-{
- private static final Logger log = Logger.getLogger(PassivationEvictionPolicy.class);
-
- public void evict(Fqn fqn) throws Exception
- {
- log.debug("EVICTING: " + fqn.toString() + " size: " + fqn.size() + " 0: " + fqn.get(0));
- super.evict(fqn);
- }
-}
Deleted: projects/ejb3/dev/Branch_JBoss_Cache_3/core/src/main/java/org/jboss/ejb3/cache/tree/SFSBFileCacheLoader.java
===================================================================
--- projects/ejb3/dev/Branch_JBoss_Cache_3/core/src/main/java/org/jboss/ejb3/cache/tree/SFSBFileCacheLoader.java 2008-10-26 18:12:21 UTC (rev 80083)
+++ projects/ejb3/dev/Branch_JBoss_Cache_3/core/src/main/java/org/jboss/ejb3/cache/tree/SFSBFileCacheLoader.java 2008-10-26 18:17:03 UTC (rev 80084)
@@ -1,59 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.ejb3.cache.tree;
-
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.jboss.cache.Fqn;
-import org.jboss.cache.loader.FileCacheLoader;
-
-public class SFSBFileCacheLoader extends FileCacheLoader
-{
- Log log = LogFactory.getLog(SFSBFileCacheLoader.class);
-
- @Override
-
- protected boolean isCharacterPortableTree(Fqn fqn)
- {
- /* For fqn, check '*' '<' '>' '|' '"' '?' and also '\' '/' and ':' */
- Pattern fqnPattern = Pattern.compile("[\\\\\\/:*<>|\"?]");
-
- List elements = fqn.peekElements();
- for (Object anElement : elements)
- {
- Matcher matcher = fqnPattern.matcher(anElement.toString());
- if (matcher.find())
- {
- log.warn("One of the Fqn ( " + fqn + " ) elements contains one of these characters: '*' '<' '>' '|' '\"' '?' '\\' '/' ':' ");
- log.warn("Directories containing these characters are illegal in some operative systems and could lead to portability issues");
- return false;
- }
- }
-
- return true;
- }
-
-}
Deleted: projects/ejb3/dev/Branch_JBoss_Cache_3/core/src/main/java/org/jboss/ejb3/cache/tree/StatefulCacheLoader.java
===================================================================
--- projects/ejb3/dev/Branch_JBoss_Cache_3/core/src/main/java/org/jboss/ejb3/cache/tree/StatefulCacheLoader.java 2008-10-26 18:12:21 UTC (rev 80083)
+++ projects/ejb3/dev/Branch_JBoss_Cache_3/core/src/main/java/org/jboss/ejb3/cache/tree/StatefulCacheLoader.java 2008-10-26 18:17:03 UTC (rev 80084)
@@ -1,57 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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.ejb3.cache.tree;
-
-import java.util.Map;
-import org.jboss.cache.Fqn;
-import org.jboss.ejb3.stateful.StatefulBeanContext;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @deprecated Use direct JBossCache passivation now.
- * @version $Revision$
- */
-public class StatefulCacheLoader extends PassivationCacheLoader
-{
-
- public StatefulCacheLoader()
- {
- super();
- }
-
- public Map get(Fqn fqn) throws Exception
- {
- Map map = super.get(fqn);
-
- if (map.size() > 0)
- {
- if (fqn.size() == 2)
- {
- StatefulBeanContext bean = (StatefulBeanContext) map.get("bean");
- bean.postActivate();
- }
- }
- return map;
- }
-}
Deleted: projects/ejb3/dev/Branch_JBoss_Cache_3/core/src/main/java/org/jboss/ejb3/cache/tree/StatefulEvictionPolicy.java
===================================================================
--- projects/ejb3/dev/Branch_JBoss_Cache_3/core/src/main/java/org/jboss/ejb3/cache/tree/StatefulEvictionPolicy.java 2008-10-26 18:12:21 UTC (rev 80083)
+++ projects/ejb3/dev/Branch_JBoss_Cache_3/core/src/main/java/org/jboss/ejb3/cache/tree/StatefulEvictionPolicy.java 2008-10-26 18:17:03 UTC (rev 80084)
@@ -1,71 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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.ejb3.cache.tree;
-
-import java.util.Map;
-
-import org.jboss.cache.Fqn;
-import org.jboss.cache.Node;
-import org.jboss.ejb3.stateful.StatefulBeanContext;
-import org.jboss.logging.Logger;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @deprecated Use direct JBossCache passivation now.
- * @version $Revision$
- */
-public class StatefulEvictionPolicy extends PassivationEvictionPolicy
-{
- private static final Logger log = Logger.getLogger(StatefulEvictionPolicy.class);
-
- public StatefulEvictionPolicy()
- {
- super();
- }
-
- public void evict(Fqn fqn) throws Exception
- {
- // never allow root node to be evicted
- if (fqn.size() == 2)
- {
- StatefulBeanContext bean = (StatefulBeanContext) cache_.get(fqn, "bean");
-
- if (bean == null)
- {
- super.evict(fqn);
- return;
- }
- synchronized (bean)
- {
- if (bean.isInUse())
- {
- bean.markedForPassivation = true;
- super.evict(fqn);
- return;
- }
- super.evict(fqn);
- }
- }
- }
-}
More information about the jboss-cvs-commits
mailing list