[java-opensaml COMMIT] /trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/MemoryStorageService.java

noreply at shibboleth.net noreply at shibboleth.net
Fri Oct 11 16:49:21 EDT 2013


Author: scantor
Date: Fri Oct 11 16:49:20 2013
New Revision: 3472

URL: http://svn.shibboleth.net/view/java-opensaml?rev=3472&view=rev
Log:
Add some logging.

Modified:
    trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/MemoryStorageService.java

Modified: trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/MemoryStorageService.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/MemoryStorageService.java?rev=3472&r1=3471&r2=3472&view=diff
==============================================================================
--- trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/MemoryStorageService.java (original)
+++ trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/MemoryStorageService.java Fri Oct 11 16:49:20 2013
@@ -254,15 +254,18 @@
             
             Map<String, MutableStorageRecord> dataMap = contextMap.get(context);
             if (dataMap == null) {
+                log.debug("Read failed, context '{}' not found", context);
                 return new Pair();
             }
 
             StorageRecord record = dataMap.get(key);
             if (record == null) {
+                log.debug("Read failed, key '{}' not found in context '{}'", key, context);
                 return new Pair();
             } else {
                 Long exp = record.getExpiration();
                 if (exp != null && System.currentTimeMillis() >= exp) {
+                    log.debug("Read failed, key '{}' expired in context '{}'", key, context);
                     return new Pair();
                 }
             }
@@ -303,15 +306,18 @@
 
             Map<String, MutableStorageRecord> dataMap = contextMap.get(context);
             if (dataMap == null) {
+                log.debug("Update failed, context '{}' not found", context);
                 return null;
             }
             
             MutableStorageRecord record = dataMap.get(key);
             if (record == null) {
+                log.debug("Update failed, key '{}' not found in context '{}'", key, context);
                 return null;
             } else {
                 Long exp = record.getExpiration();
                 if (exp != null && System.currentTimeMillis() >= exp) {
+                    log.debug("Update failed, key '{}' expired in context '{}'", key, context);
                     return null;
                 }
             }
@@ -359,13 +365,13 @@
 
             Map<String, MutableStorageRecord> dataMap = contextMap.get(context);
             if (dataMap == null) {
-                log.debug("Deleting record '{}' in context '{}'....not found", key, context);
+                log.debug("Deleting record '{}' in context '{}'....context not found", key, context);
                 return false;
             }
 
             MutableStorageRecord record = dataMap.get(key);
             if (record == null) {
-                log.debug("Deleting record '{}' in context '{}'....not found", key, context);
+                log.debug("Deleting record '{}' in context '{}'....key not found", key, context);
                 return false;
             } else if (version != null && record.getVersion() != version) {
                 throw new VersionMismatchException();



More information about the commits mailing list