[jboss-cvs] Picketbox SVN: r179 - in trunk: security-spi/spi/src/main/java/org/jboss/security and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Mar 31 09:49:42 EDT 2011


Author: mmoyses
Date: 2011-03-31 09:49:41 -0400 (Thu, 31 Mar 2011)
New Revision: 179

Added:
   trunk/security-spi/spi/src/main/java/org/jboss/security/CacheableManager.java
Modified:
   trunk/parent/
Log:
SECURITY-576: creating CacheableManager interface


Property changes on: trunk/parent
___________________________________________________________________
Added: svn:ignore
   + .project
.settings


Added: trunk/security-spi/spi/src/main/java/org/jboss/security/CacheableManager.java
===================================================================
--- trunk/security-spi/spi/src/main/java/org/jboss/security/CacheableManager.java	                        (rev 0)
+++ trunk/security-spi/spi/src/main/java/org/jboss/security/CacheableManager.java	2011-03-31 13:49:41 UTC (rev 179)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.security;
+
+/**
+ * An interface for managers that allow cached values.
+ * 
+ * @author <a href="mmoyses at redhat.com">Marcus Moyses</a>
+ */
+public interface CacheableManager <T, K>
+{
+
+   /**
+    * Sets the cache.
+    * 
+    * @param cache New cache to use.
+    */
+   public void setCache(T cache);
+   
+   /**
+    * Flushes all entries from the cache.
+    *
+    */
+   public void flushCache();
+   
+   /**
+    * Flushes one entry from the cache.
+    * 
+    * @param key Entry's key.
+    */
+   public void flushCache(K key);
+   
+   /**
+    * Checks if an entry exists in the cache.
+    * 
+    * @param key Entry's key
+    * @return true if there is an entry, false otherwise.
+    */
+   public boolean containsKey(K key);
+   
+}



More information about the jboss-cvs-commits mailing list