Class FilePageStore

    • Constructor Detail

      • FilePageStore

        public FilePageStore​(java.lang.String applicationName,
                             java.io.File fileStoreFolder,
                             org.apache.wicket.util.lang.Bytes maxSizePerSession)
        Create a store that supports SerializedPages only.
        Parameters:
        applicationName - name of application
        fileStoreFolder - folder to store to
        maxSizePerSession - maximum size per session
        See Also:
        SerializingPageStore
      • FilePageStore

        public FilePageStore​(java.lang.String applicationName,
                             java.io.File fileStoreFolder,
                             org.apache.wicket.util.lang.Bytes maxSizePerSession,
                             ISerializer serializer)
        Create a store to files.
        Parameters:
        applicationName - name of application
        fileStoreFolder - folder to store to
        maxSizePerSession - maximum size per session
        serializer - for serialization of pages
    • Method Detail

      • supportsVersioning

        public boolean supportsVersioning()
        Pages are always serialized, so versioning is supported.
        Specified by:
        supportsVersioning in interface IPageStore
      • getPageType

        protected java.lang.String getPageType​(java.io.File file)
        Get the type of page from the given file.

        This is an optional operation that returns null in case of any error.

        Parameters:
        file -
        Returns:
        pageType
      • setPageType

        protected void setPageType​(java.io.File file,
                                   java.lang.String pageType)
        Set the type of page on the given file.

        This is an optional operation that silently fails in case of an error.

        Parameters:
        file -
        pageType -
      • getTotalSize

        public org.apache.wicket.util.lang.Bytes getTotalSize()
        Description copied from interface: IPersistentPageStore
        Get total size of all pages stored in all contexts.

        Optional operation, may return null.

        Specified by:
        getTotalSize in interface IPersistentPageStore
        Returns:
        total size or null