jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r766759 - in /jackrabbit/branches/1.5/jackrabbit-jcr2spi/src: main/java/org/apache/jackrabbit/jcr2spi/ main/java/org/apache/jackrabbit/jcr2spi/config/ test/java/org/apache/jackrabbit/jcr2spi/
Date Mon, 20 Apr 2009 17:15:37 GMT
Author: mduerig
Date: Mon Apr 20 17:15:36 2009
New Revision: 766759

URL: http://svn.apache.org/viewvc?rev=766759&view=rev
Log:
1.5: Backported revision 731941 (JCR-1906)

Modified:
    jackrabbit/branches/1.5/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/SessionImpl.java
    jackrabbit/branches/1.5/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceImpl.java
    jackrabbit/branches/1.5/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/config/RepositoryConfig.java
    jackrabbit/branches/1.5/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/AbstractRepositoryConfig.java

Modified: jackrabbit/branches/1.5/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/SessionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.5/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/SessionImpl.java?rev=766759&r1=766758&r2=766759&view=diff
==============================================================================
--- jackrabbit/branches/1.5/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/SessionImpl.java
(original)
+++ jackrabbit/branches/1.5/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/SessionImpl.java
Mon Apr 20 17:15:36 2009
@@ -705,6 +705,10 @@
         return config.getCacheBehaviour();
     }
 
+    int getPollTimeout() {
+        return config.getPollTimeout();
+    }
+
     //--------------------------------------------------------------------------
     SessionImpl switchWorkspace(String workspaceName) throws AccessDeniedException,
         NoSuchWorkspaceException, RepositoryException {
@@ -858,4 +862,5 @@
             throw new NoSuchWorkspaceException("Unknown workspace: '" + workspaceName + "'.");
         }
     }
+
 }

Modified: jackrabbit/branches/1.5/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.5/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceImpl.java?rev=766759&r1=766758&r2=766759&view=diff
==============================================================================
--- jackrabbit/branches/1.5/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceImpl.java
(original)
+++ jackrabbit/branches/1.5/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceImpl.java
Mon Apr 20 17:15:36 2009
@@ -111,7 +111,7 @@
                 config.getRepositoryService(),
                 sessionInfo,
                 session.getCacheBehaviour(),
-                3 * 1000); // 3 seconds poll timeout
+                session.getPollTimeout());
     }
 
     //----------------------------------------------------------< Workspace >---
@@ -317,7 +317,7 @@
 
         // make sure the given import target is accessible, not locked and checked out.
         int options = ItemStateValidator.CHECK_ACCESS | ItemStateValidator.CHECK_LOCK | ItemStateValidator.CHECK_VERSIONING;
-        getValidator().checkIsWritable((NodeState) parentState, options);
+        getValidator().checkIsWritable(parentState, options);
 
         // build the content handler
         return new WorkspaceContentHandler(this, parentAbsPath, uuidBehavior);

Modified: jackrabbit/branches/1.5/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/config/RepositoryConfig.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.5/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/config/RepositoryConfig.java?rev=766759&r1=766758&r2=766759&view=diff
==============================================================================
--- jackrabbit/branches/1.5/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/config/RepositoryConfig.java
(original)
+++ jackrabbit/branches/1.5/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/config/RepositoryConfig.java
Mon Apr 20 17:15:36 2009
@@ -35,4 +35,10 @@
     public CacheBehaviour getCacheBehaviour();
 
     public int getItemCacheSize();
-}
\ No newline at end of file
+
+    /**
+     * Specifies an interval used for polling the {@link RepositoryService} for changes.
+     * @return  the poll timeout in milliseconds.
+     */
+    public int getPollTimeout();
+}

Modified: jackrabbit/branches/1.5/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/AbstractRepositoryConfig.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.5/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/AbstractRepositoryConfig.java?rev=766759&r1=766758&r2=766759&view=diff
==============================================================================
--- jackrabbit/branches/1.5/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/AbstractRepositoryConfig.java
(original)
+++ jackrabbit/branches/1.5/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/AbstractRepositoryConfig.java
Mon Apr 20 17:15:36 2009
@@ -29,6 +29,7 @@
     private static Logger log = LoggerFactory.getLogger(AbstractRepositoryConfig.class);
 
     private static final int DEFAULT_ITEM_CACHE_SIZE = 5000;
+    private static final int DEFAULT_POLL_TIMEOUT = 3000; // 3 seconds
 
     public CacheBehaviour getCacheBehaviour() {
         return CacheBehaviour.INVALIDATE;
@@ -37,4 +38,9 @@
     public int getItemCacheSize() {
         return DEFAULT_ITEM_CACHE_SIZE;
     }
-}
\ No newline at end of file
+
+    public int getPollTimeout() {
+        return DEFAULT_POLL_TIMEOUT;
+    }
+
+}



Mime
View raw message