Class ModelStorer<StoredModelType extends Model<StoredModelType>,​ModelStorerType extends ModelStorer<StoredModelType,​?>>

  • Direct Known Subclasses:
    DbModelStorer, FileModelStorer, GenericModelStorer

    public abstract class ModelStorer<StoredModelType extends Model<StoredModelType>,​ModelStorerType extends ModelStorer<StoredModelType,​?>>
    extends java.lang.Object
    Base class for the different model storers (DB, File).
    Since:
    21.1
    • Constructor Summary

      Constructors 
      Constructor Description
      ModelStorer​(PgxSession session, oracle.pgx.api.internal.Core core, StoredModelType model, java.util.function.Supplier<java.lang.String> keystorePathSupplier, java.util.function.Supplier<char[]> keystorePasswordSupplier)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      ModelStorerType overwrite​(boolean overwrite)
      Configures if the model should be overwritten if one already existed at the specified location
      void store()
      Trigger the storing, once all the parameters have been set (blocking version)
      abstract PgxFuture<java.lang.Void> storeAsync()
      Trigger the storing, once all the parameters have been set (async version)
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ModelStorer

        public ModelStorer​(PgxSession session,
                           oracle.pgx.api.internal.Core core,
                           StoredModelType model,
                           java.util.function.Supplier<java.lang.String> keystorePathSupplier,
                           java.util.function.Supplier<char[]> keystorePasswordSupplier)
    • Method Detail

      • overwrite

        public ModelStorerType overwrite​(boolean overwrite)
        Configures if the model should be overwritten if one already existed at the specified location
        Parameters:
        overwrite - whether or not to overwrite the previous model if there is one
        Returns:
        this instance
        Since:
        21.1
      • storeAsync

        public abstract PgxFuture<java.lang.Void> storeAsync()
        Trigger the storing, once all the parameters have been set (async version)
        Since:
        21.1
      • store

        public void store()
                   throws java.util.concurrent.ExecutionException,
                          java.lang.InterruptedException
        Trigger the storing, once all the parameters have been set (blocking version)
        Throws:
        java.util.concurrent.ExecutionException
        java.lang.InterruptedException
        Since:
        21.1