Class AbstractSegmentedStoreConfiguration<T extends AbstractStoreConfiguration>

    • Method Detail

      • newConfigurationFrom

        @Deprecated
        public T newConfigurationFrom​(int segment)
        Deprecated.
        Method that is invoked each time a new store is created for a segment. This method should return a new configuration that is configured to be persisted using the given segment.
        Parameters:
        segment - the segment to use
        Returns:
        the newly created configuration
      • newConfigurationFrom

        public T newConfigurationFrom​(int segment,
                                      InitializationContext ctx)
        Same as newConfigurationFrom(int) except that you can utilize the intialization context when initializing the segmented store object. This method
        Parameters:
        segment - the segment to use
        ctx - the initialization context from the persistence layer
        Returns:
        the newly created configuration
      • fileLocationTransform

        public static String fileLocationTransform​(String location,
                                                   int segment)
        Transforms a file location to a segment based one. This is useful for file based stores where all you need to do is append a segment to the name of the directory. If the provided location is a directory, that is that it is terminated by in File.separatorChar, it will add a new directory onto that that is the segment. If the location is a file, that is that it is not terminated by File.separatorChar, this will treat the location as a directory and append a segment file in it. The underlying store may or may not preserve this and could still turn the segment into a directory.
        Parameters:
        location - original file location
        segment - the segment to append
        Returns:
        string with the segment appended to the file location