Class InMemoryResourceIngestionDefinitionRepository<R extends com.snowflake.connectors.application.ingestion.definition.ResourceIngestionDefinition<?,​?,​?,​?>>

  • All Implemented Interfaces:
    com.snowflake.connectors.application.ingestion.definition.ResourceIngestionDefinitionRepository<R>

    public class InMemoryResourceIngestionDefinitionRepository<R extends com.snowflake.connectors.application.ingestion.definition.ResourceIngestionDefinition<?,​?,​?,​?>>
    extends Object
    implements com.snowflake.connectors.application.ingestion.definition.ResourceIngestionDefinitionRepository<R>
    In memory implementation of ResourceIngestionDefinitionRepository
    • Method Detail

      • fetch

        public Optional<R> fetch​(String id)
        Specified by:
        fetch in interface com.snowflake.connectors.application.ingestion.definition.ResourceIngestionDefinitionRepository<R extends com.snowflake.connectors.application.ingestion.definition.ResourceIngestionDefinition<?,​?,​?,​?>>
      • fetchByResourceId

        public Optional<R> fetchByResourceId​(Object resourceId)
        Specified by:
        fetchByResourceId in interface com.snowflake.connectors.application.ingestion.definition.ResourceIngestionDefinitionRepository<R extends com.snowflake.connectors.application.ingestion.definition.ResourceIngestionDefinition<?,​?,​?,​?>>
      • fetchAllById

        public List<R> fetchAllById​(List<String> ids)
        Specified by:
        fetchAllById in interface com.snowflake.connectors.application.ingestion.definition.ResourceIngestionDefinitionRepository<R extends com.snowflake.connectors.application.ingestion.definition.ResourceIngestionDefinition<?,​?,​?,​?>>
      • fetchAllEnabled

        public List<R> fetchAllEnabled()
        Specified by:
        fetchAllEnabled in interface com.snowflake.connectors.application.ingestion.definition.ResourceIngestionDefinitionRepository<R extends com.snowflake.connectors.application.ingestion.definition.ResourceIngestionDefinition<?,​?,​?,​?>>
      • fetchAllWhere

        public List<R> fetchAllWhere​(Column condition)
        Specified by:
        fetchAllWhere in interface com.snowflake.connectors.application.ingestion.definition.ResourceIngestionDefinitionRepository<R extends com.snowflake.connectors.application.ingestion.definition.ResourceIngestionDefinition<?,​?,​?,​?>>
      • fetchAll

        public List<R> fetchAll()
        Specified by:
        fetchAll in interface com.snowflake.connectors.application.ingestion.definition.ResourceIngestionDefinitionRepository<R extends com.snowflake.connectors.application.ingestion.definition.ResourceIngestionDefinition<?,​?,​?,​?>>
      • setFetchAllWherePredicate

        public void setFetchAllWherePredicate​(Predicate<Map.Entry<String,​R>> fetchAllWherePredicate)
        Sets the predicate used by the fetchAllWhere method.
        Parameters:
        fetchAllWherePredicate - new predicate
      • countEnabled

        public long countEnabled()
        Specified by:
        countEnabled in interface com.snowflake.connectors.application.ingestion.definition.ResourceIngestionDefinitionRepository<R extends com.snowflake.connectors.application.ingestion.definition.ResourceIngestionDefinition<?,​?,​?,​?>>
      • save

        public void save​(R resource)
        Specified by:
        save in interface com.snowflake.connectors.application.ingestion.definition.ResourceIngestionDefinitionRepository<R extends com.snowflake.connectors.application.ingestion.definition.ResourceIngestionDefinition<?,​?,​?,​?>>
      • saveMany

        public void saveMany​(List<R> resources)
        Specified by:
        saveMany in interface com.snowflake.connectors.application.ingestion.definition.ResourceIngestionDefinitionRepository<R extends com.snowflake.connectors.application.ingestion.definition.ResourceIngestionDefinition<?,​?,​?,​?>>
      • clear

        public void clear()
        Clears the repository.