Class GoogleCloudStorage<ModelOutput_ extends ai.timefold.solver.service.definition.api.ModelOutput>

java.lang.Object
ai.timefold.solver.enterprise.service.storage.core.impl.AbstractStorage<ModelOutput_>
ai.timefold.solver.enterprise.service.storage.gcs.impl.GoogleCloudStorage<ModelOutput_>
All Implemented Interfaces:
ai.timefold.solver.service.definition.internal.storage.Storage<ModelOutput_>

public abstract class GoogleCloudStorage<ModelOutput_ extends ai.timefold.solver.service.definition.api.ModelOutput> extends ai.timefold.solver.enterprise.service.storage.core.impl.AbstractStorage<ModelOutput_>
  • Field Summary

    Fields inherited from class ai.timefold.solver.enterprise.service.storage.core.impl.AbstractStorage

    mapper

    Fields inherited from interface ai.timefold.solver.service.definition.internal.storage.Storage

    DATASETS_PREFIX, RUNS_PREFIX
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
     
    GoogleCloudStorage(com.google.cloud.storage.Storage storage, String bucket, String bucketPrefix, boolean useCache, String keyPrefix, String region, ai.timefold.solver.enterprise.service.storage.core.impl.StorageObjectMapperWrapper storageObjectMapperWrapper)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    void
    clean(ai.timefold.solver.service.definition.internal.storage.StorageAddress options)
     
    void
    complete(ai.timefold.solver.service.definition.internal.storage.StorageAddress options, String id, ModelOutput_ dataset)
     
    void
    create(String id, ai.timefold.solver.service.definition.internal.storage.StorageConfiguration configuration)
     
    void
    delete(ai.timefold.solver.service.definition.internal.storage.StorageAddress options, String id)
     
    void
     
    boolean
    exists(ai.timefold.solver.service.definition.internal.storage.StorageAddress options, String id)
     
    boolean
    existsSubModel(ai.timefold.solver.service.definition.internal.storage.StorageAddress options, String id, ai.timefold.solver.service.definition.internal.storage.SubModelKind kind)
     
    get(ai.timefold.solver.service.definition.internal.storage.StorageAddress options, String id)
     
    <T> T
    getSubModel(ai.timefold.solver.service.definition.internal.storage.StorageAddress options, String id, ai.timefold.solver.service.definition.internal.storage.SubModelKind type, com.fasterxml.jackson.core.type.TypeReference<T> configurationClass)
     
    <T> T
    getSubModel(ai.timefold.solver.service.definition.internal.storage.StorageAddress options, String id, ai.timefold.solver.service.definition.internal.storage.SubModelKind type, Class<T> clazz)
     
    void
    getSubModelStream(ai.timefold.solver.service.definition.internal.storage.StorageAddress options, String id, ai.timefold.solver.service.definition.internal.storage.SubModelKind subModelKind, OutputStream output)
     
    List<ai.timefold.solver.service.definition.api.Status>
    list(ai.timefold.solver.service.definition.internal.storage.StorageAddress options, int pageNumber, int pageSize)
     
    protected void
    putObject(ai.timefold.solver.service.definition.internal.storage.StorageAddress options, String id, ModelOutput_ dataset)
     
    protected void
    putSubModelObject(ai.timefold.solver.service.definition.internal.storage.StorageAddress options, String id, ai.timefold.solver.service.definition.internal.storage.SubModelKind type, byte[] content, Map<String,String> metadata)
     
    void
    reconfigure(String id, ai.timefold.solver.service.definition.internal.storage.StorageConfiguration configuration)
     
    void
    restore(ai.timefold.solver.service.definition.internal.storage.StorageAddress options, String id)
     
    void
    store(ai.timefold.solver.service.definition.internal.storage.StorageAddress options, String id, ModelOutput_ dataset)
     
    void
    storeSubModel(ai.timefold.solver.service.definition.internal.storage.StorageAddress options, String id, ai.timefold.solver.service.definition.internal.storage.SubModelKind type, Object subModel)
     
    void
    update(ai.timefold.solver.service.definition.internal.storage.StorageAddress options, String id, ModelOutput_ dataset)
     
    void
    updateSubModel(ai.timefold.solver.service.definition.internal.storage.StorageAddress options, String id, ai.timefold.solver.service.definition.internal.storage.SubModelKind subModelKind, Object subModel)
     
    protected byte[]
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface ai.timefold.solver.service.definition.internal.storage.Storage

    clean, complete, delete, exists, existsSubModel, get, getSubModel, getSubModel, getSubModelStream, list, restore, store, storeSubModel, update, updateSubModel
  • Constructor Details

    • GoogleCloudStorage

      protected GoogleCloudStorage()
    • GoogleCloudStorage

      public GoogleCloudStorage(com.google.cloud.storage.Storage storage, String bucket, String bucketPrefix, boolean useCache, String keyPrefix, String region, ai.timefold.solver.enterprise.service.storage.core.impl.StorageObjectMapperWrapper storageObjectMapperWrapper)
  • Method Details

    • store

      public void store(ai.timefold.solver.service.definition.internal.storage.StorageAddress options, String id, ModelOutput_ dataset)
    • update

      public void update(ai.timefold.solver.service.definition.internal.storage.StorageAddress options, String id, ModelOutput_ dataset)
    • complete

      public void complete(ai.timefold.solver.service.definition.internal.storage.StorageAddress options, String id, ModelOutput_ dataset)
    • get

      public ModelOutput_ get(ai.timefold.solver.service.definition.internal.storage.StorageAddress options, String id)
    • delete

      public void delete(ai.timefold.solver.service.definition.internal.storage.StorageAddress options, String id)
    • restore

      public void restore(ai.timefold.solver.service.definition.internal.storage.StorageAddress options, String id)
    • exists

      public boolean exists(ai.timefold.solver.service.definition.internal.storage.StorageAddress options, String id)
    • getSubModel

      public <T> T getSubModel(ai.timefold.solver.service.definition.internal.storage.StorageAddress options, String id, ai.timefold.solver.service.definition.internal.storage.SubModelKind type, Class<T> clazz)
    • getSubModel

      public <T> T getSubModel(ai.timefold.solver.service.definition.internal.storage.StorageAddress options, String id, ai.timefold.solver.service.definition.internal.storage.SubModelKind type, com.fasterxml.jackson.core.type.TypeReference<T> configurationClass)
    • existsSubModel

      public boolean existsSubModel(ai.timefold.solver.service.definition.internal.storage.StorageAddress options, String id, ai.timefold.solver.service.definition.internal.storage.SubModelKind kind)
    • getSubModelStream

      public void getSubModelStream(ai.timefold.solver.service.definition.internal.storage.StorageAddress options, String id, ai.timefold.solver.service.definition.internal.storage.SubModelKind subModelKind, OutputStream output)
    • storeSubModel

      public void storeSubModel(ai.timefold.solver.service.definition.internal.storage.StorageAddress options, String id, ai.timefold.solver.service.definition.internal.storage.SubModelKind type, Object subModel)
    • updateSubModel

      public void updateSubModel(ai.timefold.solver.service.definition.internal.storage.StorageAddress options, String id, ai.timefold.solver.service.definition.internal.storage.SubModelKind subModelKind, Object subModel)
    • list

      public List<ai.timefold.solver.service.definition.api.Status> list(ai.timefold.solver.service.definition.internal.storage.StorageAddress options, int pageNumber, int pageSize)
    • clean

      public void clean(ai.timefold.solver.service.definition.internal.storage.StorageAddress options)
    • create

      public void create(String id, ai.timefold.solver.service.definition.internal.storage.StorageConfiguration configuration)
    • reconfigure

      public void reconfigure(String id, ai.timefold.solver.service.definition.internal.storage.StorageConfiguration configuration)
    • destroy

      public void destroy(String id)
    • putObject

      @Retry(maxRetries=3, delay=1L, delayUnit=SECONDS, retryOn=RateLimitExceededException.class) protected void putObject(ai.timefold.solver.service.definition.internal.storage.StorageAddress options, String id, ModelOutput_ dataset)
    • putSubModelObject

      @Retry(maxRetries=3, delay=1L, delayUnit=SECONDS, retryOn=RateLimitExceededException.class) protected void putSubModelObject(ai.timefold.solver.service.definition.internal.storage.StorageAddress options, String id, ai.timefold.solver.service.definition.internal.storage.SubModelKind type, byte[] content, Map<String,String> metadata)
    • writeAsBytes

      protected byte[] writeAsBytes(String id, Object data)
    • clazz

      public abstract Class<ModelOutput_> clazz()