Class BundleFsPersistenceManager

    • Constructor Detail

      • BundleFsPersistenceManager

        public BundleFsPersistenceManager()
    • Method Detail

      • getBlobFSBlockSize

        public String getBlobFSBlockSize()
        Returns the configured block size of the blob cqfs
        Returns:
        the block size.
      • setBlobFSBlockSize

        public void setBlobFSBlockSize​(String size)
        Sets the block size of the blob fs and controls how blobs are handled.
        If the size is 0, the blobs are stored within the workspace's physical filesystem.
        Otherwise, the blobs are stored within the item filesystem.
        Please note that not all binary properties are considered as blobs. They are only stored in the respective blob store, if their size exceeds getMinBlobSize().
        Parameters:
        size - the block size
      • useLocalFsBlobStore

        public boolean useLocalFsBlobStore()
        Returns true if the blobs are stored in the local fs.
        Returns:
        true if the blobs are stored in the local fs.
      • getMinBlobSize

        public String getMinBlobSize()
        Returns the mininum blob size.
        Returns:
        the mininum blob size.
      • setMinBlobSize

        public void setMinBlobSize​(String minBlobSize)
        Sets the minimum blob size. This size defines the threshold of which size a property is included in the bundle or is stored in the blob store. Very high values decrease the performance.
        Parameters:
        minBlobSize -
      • setErrorHandling

        public void setErrorHandling​(String errorHandling)
        Sets the error handling behaviour of this manager. See ErrorHandling for details about the flags.
        Parameters:
        errorHandling -
      • getErrorHandling

        public String getErrorHandling()
        Returns the error handling configuration of this manager
        Returns:
        the error handling configuration of this manager
      • init

        public void init​(PMContext context)
                  throws Exception
        Initializes the persistence manager. The persistence manager is permanently bound to the given context, and any required external resources are acquired.

        An appropriate exception is thrown if the persistence manager initialization fails for whatever reason. In this case the state of the persistence manager is undefined and the instance should be discarded. Initializes the internal structures of this abstract persistence manager.

        Specified by:
        init in interface PersistenceManager
        Overrides:
        init in class AbstractBundlePersistenceManager
        Parameters:
        context - persistence manager context
        Throws:
        Exception - if the persistence manager initialization failed
      • close

        public void close()
                   throws Exception
        Closes the persistence manager. The consistency of the persistent storage is guaranteed and all acquired resources are released. It is an error to invoke any methods on a closed persistence manager, and implementations are free to enforce this constraint by throwing IllegalStateExceptions in such cases.

        An appropriate exception is thrown if the persistence manager could not be closed properly. In this case the state of the persistence manager is undefined and the instance should be discarded. Closes the persistence manager, release acquired resources.

        Specified by:
        close in interface PersistenceManager
        Overrides:
        close in class AbstractBundlePersistenceManager
        Throws:
        Exception - if the persistence manager failed to close properly
      • existsReferencesTo

        public boolean existsReferencesTo​(NodeId targetId)
                                   throws ItemStateException
        Checks whether references of the identified target node exist.
        Parameters:
        targetId - target node id
        Returns:
        true if the references exist, false otherwise
        Throws:
        ItemStateException - on persistence manager errors
      • logException

        protected void logException​(String message,
                                    SQLException se)
        logs an sql exception
        Parameters:
        message -
        se -
      • getAllNodeIds

        public List<NodeId> getAllNodeIds​(NodeId bigger,
                                          int maxCount)
                                   throws ItemStateException
        Get all node ids. A typical application will call this method multiple times, where 'after' is the last row read previously. The maxCount parameter defines the maximum number of node ids returned, 0 meaning no limit. The order of the node ids is specific for the given persistent manager. Items that are added concurrently may not be included.
        Parameters:
        bigger - the lower limit, or null for no limit.
        maxCount - the maximum number of node ids to return, or 0 for no limit.
        Returns:
        a list of all node ids.
        Throws:
        ItemStateException - if an error while loading occurs.
      • getIdFromFileName

        protected NodeId getIdFromFileName​(String fileName)