Class OakRepositoryFixture

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static RepositoryFixture getCompositeMemoryStore()  
      static RepositoryFixture getCompositeMongoStore​(java.lang.String uri, long cacheSize, boolean dropDBAfterTest, boolean throttlingEnabled)  
      static RepositoryFixture getCompositeStore​(java.io.File base, int maxFileSizeMB, int cacheSizeMB, boolean memoryMapping, int binariesInlineThreshold)  
      static RepositoryFixture getMemoryNS​(long cacheSize)  
      static RepositoryFixture getMongo​(java.lang.String uri, boolean dropDBAfterTest, long cacheSize, boolean throttlingEnabled)  
      static RepositoryFixture getMongo​(java.lang.String host, int port, java.lang.String database, boolean dropDBAfterTest, long cacheSize, boolean throttlingEnabled)  
      static RepositoryFixture getMongoNS​(java.lang.String uri, boolean dropDBAfterTest, long cacheSize, boolean throttlingEnabled)  
      static RepositoryFixture getMongoNS​(java.lang.String host, int port, java.lang.String database, boolean dropDBAfterTest, long cacheSize, boolean throttlingEnabled)  
      static RepositoryFixture getMongoWithDS​(java.lang.String uri, boolean dropDBAfterTest, long cacheSize, java.io.File base, int fdsCacheInMB, boolean throttlingEnabled)  
      static RepositoryFixture getMongoWithDS​(java.lang.String host, int port, java.lang.String database, boolean dropDBAfterTest, long cacheSize, java.io.File base, int fdsCacheInMB, boolean throttlingEnabled)  
      OakFixture getOakFixture()  
      static RepositoryFixture getRDB​(java.lang.String jdbcuri, java.lang.String jdbcuser, java.lang.String jdbcpasswd, java.lang.String jdbctableprefix, boolean dropDBAfterTest, long cacheSize, int vgcMaxAge)  
      static RepositoryFixture getRDBWithDS​(java.lang.String jdbcuri, java.lang.String jdbcuser, java.lang.String jdbcpasswd, java.lang.String jdbctableprefix, boolean dropDBAfterTest, long cacheSize, java.io.File base, int fdsCacheInMB, int vgcMaxAge)  
      static RepositoryFixture getSegmentTar​(java.io.File base, int maxFileSizeMB, int cacheSizeMB, boolean memoryMapping, int binariesInlineThreshold)  
      static RepositoryFixture getSegmentTarWithAwsSegmentStore​(java.io.File base, java.lang.String awsBucketName, java.lang.String awsRootPath, java.lang.String awsJournalTableName, java.lang.String awsLockTableName, int maxFileSizeMB, int cacheSizeMB, int binariesInlineThreshold, boolean useBlobStore, int dsCacheInMB)  
      static RepositoryFixture getSegmentTarWithAzureSegmentStore​(java.io.File base, java.lang.String azureConnectionString, java.lang.String azureContainerName, java.lang.String azureRootPath, int maxFileSizeMB, int cacheSizeMB, int binariesInlineThreshold, boolean useBlobStore, int dsCacheInMB)  
      static RepositoryFixture getSegmentTarWithColdStandby​(java.io.File base, int maxFileSizeMB, int cacheSizeMB, boolean memoryMapping, int binariesInlineThreshold, boolean useBlobStore, int dsCacheInMB, int syncInterval, boolean shareBlobStore, boolean secure, boolean oneShotRun)  
      static RepositoryFixture getSegmentTarWithDataStore​(java.io.File base, int maxFileSizeMB, int cacheSizeMB, boolean memoryMapping, int binariesInlineThreshold, int dsCacheInMB)  
      boolean isAvailable​(int n)
      Checks whether this fixture is currently available.
      void setStatisticsProvider​(StatisticsProvider statisticsProvider)  
      Repository[] setUpCluster​(int n)
      Creates a new repository cluster with the given number of nodes.
      Repository[] setUpCluster​(int n, JcrCreator customizer)  
      void syncRepositoryCluster​(Repository... nodes)
      Ensures that all content changes seen by one of the given cluster nodes are seen also by all the other given nodes.
      void tearDownCluster()
      Releases resources associated with the given repository cluster.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • OakRepositoryFixture

        protected OakRepositoryFixture​(OakFixture oakFixture)
    • Method Detail

      • getMongo

        public static RepositoryFixture getMongo​(java.lang.String host,
                                                 int port,
                                                 java.lang.String database,
                                                 boolean dropDBAfterTest,
                                                 long cacheSize,
                                                 boolean throttlingEnabled)
      • getMongo

        public static RepositoryFixture getMongo​(java.lang.String uri,
                                                 boolean dropDBAfterTest,
                                                 long cacheSize,
                                                 boolean throttlingEnabled)
      • getMongoWithDS

        public static RepositoryFixture getMongoWithDS​(java.lang.String host,
                                                       int port,
                                                       java.lang.String database,
                                                       boolean dropDBAfterTest,
                                                       long cacheSize,
                                                       java.io.File base,
                                                       int fdsCacheInMB,
                                                       boolean throttlingEnabled)
      • getMongoWithDS

        public static RepositoryFixture getMongoWithDS​(java.lang.String uri,
                                                       boolean dropDBAfterTest,
                                                       long cacheSize,
                                                       java.io.File base,
                                                       int fdsCacheInMB,
                                                       boolean throttlingEnabled)
      • getMongoNS

        public static RepositoryFixture getMongoNS​(java.lang.String host,
                                                   int port,
                                                   java.lang.String database,
                                                   boolean dropDBAfterTest,
                                                   long cacheSize,
                                                   boolean throttlingEnabled)
      • getMongoNS

        public static RepositoryFixture getMongoNS​(java.lang.String uri,
                                                   boolean dropDBAfterTest,
                                                   long cacheSize,
                                                   boolean throttlingEnabled)
      • getRDB

        public static RepositoryFixture getRDB​(java.lang.String jdbcuri,
                                               java.lang.String jdbcuser,
                                               java.lang.String jdbcpasswd,
                                               java.lang.String jdbctableprefix,
                                               boolean dropDBAfterTest,
                                               long cacheSize,
                                               int vgcMaxAge)
      • getRDBWithDS

        public static RepositoryFixture getRDBWithDS​(java.lang.String jdbcuri,
                                                     java.lang.String jdbcuser,
                                                     java.lang.String jdbcpasswd,
                                                     java.lang.String jdbctableprefix,
                                                     boolean dropDBAfterTest,
                                                     long cacheSize,
                                                     java.io.File base,
                                                     int fdsCacheInMB,
                                                     int vgcMaxAge)
      • getSegmentTar

        public static RepositoryFixture getSegmentTar​(java.io.File base,
                                                      int maxFileSizeMB,
                                                      int cacheSizeMB,
                                                      boolean memoryMapping,
                                                      int binariesInlineThreshold)
      • getSegmentTarWithDataStore

        public static RepositoryFixture getSegmentTarWithDataStore​(java.io.File base,
                                                                   int maxFileSizeMB,
                                                                   int cacheSizeMB,
                                                                   boolean memoryMapping,
                                                                   int binariesInlineThreshold,
                                                                   int dsCacheInMB)
      • getSegmentTarWithColdStandby

        public static RepositoryFixture getSegmentTarWithColdStandby​(java.io.File base,
                                                                     int maxFileSizeMB,
                                                                     int cacheSizeMB,
                                                                     boolean memoryMapping,
                                                                     int binariesInlineThreshold,
                                                                     boolean useBlobStore,
                                                                     int dsCacheInMB,
                                                                     int syncInterval,
                                                                     boolean shareBlobStore,
                                                                     boolean secure,
                                                                     boolean oneShotRun)
      • getSegmentTarWithAwsSegmentStore

        public static RepositoryFixture getSegmentTarWithAwsSegmentStore​(java.io.File base,
                                                                         java.lang.String awsBucketName,
                                                                         java.lang.String awsRootPath,
                                                                         java.lang.String awsJournalTableName,
                                                                         java.lang.String awsLockTableName,
                                                                         int maxFileSizeMB,
                                                                         int cacheSizeMB,
                                                                         int binariesInlineThreshold,
                                                                         boolean useBlobStore,
                                                                         int dsCacheInMB)
      • getSegmentTarWithAzureSegmentStore

        public static RepositoryFixture getSegmentTarWithAzureSegmentStore​(java.io.File base,
                                                                           java.lang.String azureConnectionString,
                                                                           java.lang.String azureContainerName,
                                                                           java.lang.String azureRootPath,
                                                                           int maxFileSizeMB,
                                                                           int cacheSizeMB,
                                                                           int binariesInlineThreshold,
                                                                           boolean useBlobStore,
                                                                           int dsCacheInMB)
      • getCompositeStore

        public static RepositoryFixture getCompositeStore​(java.io.File base,
                                                          int maxFileSizeMB,
                                                          int cacheSizeMB,
                                                          boolean memoryMapping,
                                                          int binariesInlineThreshold)
      • getCompositeMemoryStore

        public static RepositoryFixture getCompositeMemoryStore()
      • getCompositeMongoStore

        public static RepositoryFixture getCompositeMongoStore​(java.lang.String uri,
                                                               long cacheSize,
                                                               boolean dropDBAfterTest,
                                                               boolean throttlingEnabled)
      • isAvailable

        public boolean isAvailable​(int n)
        Description copied from interface: RepositoryFixture
        Checks whether this fixture is currently available. For example a database-based fixture would only be available when the underlying database service is running.
        Specified by:
        isAvailable in interface RepositoryFixture
        Parameters:
        n - size of the requested cluster
        Returns:
        true iff the fixture is available
      • setUpCluster

        public final Repository[] setUpCluster​(int n)
                                        throws java.lang.Exception
        Description copied from interface: RepositoryFixture
        Creates a new repository cluster with the given number of nodes. The initial state of the cluster consists of just the default repository content included by the implementation. The caller of this method should have exclusive access to the created cluster. The caller is also responsible for calling RepositoryFixture.tearDownCluster() when the test cluster is no longer needed.
        Specified by:
        setUpCluster in interface RepositoryFixture
        Parameters:
        n - size of the requested cluster
        Returns:
        nodes of the created cluster
        Throws:
        java.lang.Exception - if the cluster could not be set up
      • setUpCluster

        public Repository[] setUpCluster​(int n,
                                         JcrCreator customizer)
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • syncRepositoryCluster

        public void syncRepositoryCluster​(Repository... nodes)
        Description copied from interface: RepositoryFixture
        Ensures that all content changes seen by one of the given cluster nodes are seen also by all the other given nodes. Used to help testing features like eventual consistency where the normal APIs don't make strong enough guarantees to enable writing a test case without a potentially unbounded wait for changes to propagate across the cluster.
        Specified by:
        syncRepositoryCluster in interface RepositoryFixture
        Parameters:
        nodes - cluster nodes to be synchronized
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getOakFixture

        public OakFixture getOakFixture()
      • setStatisticsProvider

        public void setStatisticsProvider​(StatisticsProvider statisticsProvider)