Class DefaultTaskRepository
- java.lang.Object
-
- com.snowflake.connectors.common.task.DefaultTaskRepository
-
- All Implemented Interfaces:
TaskRepository
public class DefaultTaskRepository extends Object implements TaskRepository
Default implementation ofTaskRepository.
-
-
Constructor Summary
Constructors Constructor Description DefaultTaskRepository(Session session)Creates a newDefaultTaskRepository.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TaskRefcreate(TaskDefinition definition, boolean replace, boolean ifNotExists)Creates or replaces task with given definition in the database.TaskReffetch(ObjectName objectName)Provides database reference to task without executing database call.
-
-
-
Constructor Detail
-
DefaultTaskRepository
public DefaultTaskRepository(Session session)
Creates a newDefaultTaskRepository.- Parameters:
session- Snowpark session object
-
-
Method Detail
-
create
public TaskRef create(TaskDefinition definition, boolean replace, boolean ifNotExists)
Description copied from interface:TaskRepositoryCreates or replaces task with given definition in the database.- Specified by:
createin interfaceTaskRepository- Parameters:
definition- set of properties defining task to be createdreplace- flag to replace task if it existedifNotExists- flag to create task only when it did not exist- Returns:
- Reference to the created task.
-
fetch
public TaskRef fetch(ObjectName objectName)
Description copied from interface:TaskRepositoryProvides database reference to task without executing database call.- Specified by:
fetchin interfaceTaskRepository- Parameters:
objectName- name of the referenced task- Returns:
- Reference task object.
-
-