[java-opensaml COMMIT] in /trunk: opensaml-storage-api/src/main/java/org/opensaml/storage/AbstractMapBackedStorageSer...

noreply at shibboleth.net noreply at shibboleth.net
Fri Oct 25 17:16:29 EDT 2013


Author: scantor
Date: Fri Oct 25 17:16:29 2013
New Revision: 3485

URL: http://svn.shibboleth.net/view/java-opensaml?rev=3485&view=rev
Log:
Refactored classes moved to -api, JSON-based request scoped impl added.

Added:
    trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/AbstractMapBackedStorageService.java
      - copied, changed from r3484, trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/AbstractMemoryStorageService.java
    trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/MutableStorageRecord.java
      - copied, changed from r3484, trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/MutableStorageRecord.java
    trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/JSONRequestScopedStorageService.java   (with props)
    trunk/opensaml-storage-impl/src/test/java/org/opensaml/storage/impl/JSONRequestScopedStorageServiceTest.java   (with props)
    trunk/opensaml-storage-impl/src/test/resources/org/opensaml/storage/impl/SealerKeyStore.jks   (with props)
Modified:
    trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/RequestScopedStorageService.java
    trunk/opensaml-storage-api/src/test/java/org/opensaml/storage/StorageServiceTest.java
    trunk/opensaml-storage-impl/pom.xml
    trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/AbstractMemoryStorageService.java
    trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/LDAPStorageService.java
    trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/MemoryStorageService.java
    trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/MutableStorageRecord.java
    trunk/opensaml-storage-impl/src/test/resources/logback-test.xml

Copied: trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/AbstractMapBackedStorageService.java (from r3484, trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/AbstractMemoryStorageService.java)
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/AbstractMapBackedStorageService.java?p2=trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/AbstractMapBackedStorageService.java&p1=trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/AbstractMemoryStorageService.java&r1=3484&r2=3485&rev=3485&view=diff
==============================================================================
--- trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/AbstractMemoryStorageService.java (original)
+++ trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/AbstractMapBackedStorageService.java Fri Oct 25 17:16:29 2013
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.opensaml.storage.impl;
+package org.opensaml.storage;
 
 import java.io.IOException;
 import java.util.HashMap;
@@ -33,9 +33,6 @@
 import net.shibboleth.utilities.java.support.annotation.constraint.Positive;
 import net.shibboleth.utilities.java.support.collection.Pair;
 
-import org.opensaml.storage.AbstractStorageService;
-import org.opensaml.storage.StorageRecord;
-import org.opensaml.storage.VersionMismatchException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -44,17 +41,19 @@
 
 
 /**
- * Partial implementation of {@link StorageService} that stores data in-memory with no persistence.
- * Abstract methods supply the map of data to manipulate and the lock to use, which allows
- * optimizations in cases where locking isn't required. 
+ * Partial implementation of {@link StorageService} that stores data in-memory with no persistence
+ * using a simple map.
+ * 
+ * <p>Abstract methods supply the map of data to manipulate and the lock to use, which allows
+ * optimizations in cases where locking isn't required or data isn't shared.<p> 
  */
-public abstract class AbstractMemoryStorageService extends AbstractStorageService {
+public abstract class AbstractMapBackedStorageService extends AbstractStorageService {
 
     /** Class logger. */
-    @Nonnull private final Logger log = LoggerFactory.getLogger(AbstractMemoryStorageService.class);
+    @Nonnull private final Logger log = LoggerFactory.getLogger(AbstractMapBackedStorageService.class);
 
     /** Constructor. */
-    public AbstractMemoryStorageService() {
+    public AbstractMapBackedStorageService() {
         setContextSize(Integer.MAX_VALUE);
         setKeySize(Integer.MAX_VALUE);
         setValueSize(Integer.MAX_VALUE);
@@ -244,7 +243,7 @@
      * @return  a pair consisting of the version of the record read back, if any, and the record itself
      * @throws IOException  if errors occur in the read process 
      */
-    @Nonnull private Pair<Integer, StorageRecord> readImpl(@Nonnull @NotEmpty final String context,
+    @Nonnull protected Pair<Integer, StorageRecord> readImpl(@Nonnull @NotEmpty final String context,
             @Nonnull @NotEmpty final String key, @Nullable final Integer version) throws IOException {
 
         Lock readLock = getLock().readLock();
@@ -296,7 +295,7 @@

[... 259 lines stripped ...]


More information about the commits mailing list