using System; using System.Collections.Generic; using System.Text; using HeuristicLab.Hive.Contracts.BusinessObjects; using System.IO; namespace HeuristicLab.Hive.Server.DataAccess { public interface IJobDao: IGenericDao { IEnumerable FindActiveJobsOfSlave(SlaveDto slave); IEnumerable GetJobsByState(JobState state); void AssignSlaveToJob(Guid slaveId, Guid jobId); void SetJobOffline(JobDto job); SerializedJob InsertWithAttachedJob(SerializedJob job); byte[] GetBinaryJobFile(Guid jobId); IEnumerable FindFittingJobsForSlave(JobState state, int freeCores, int freeMemory, Guid slaveGuid); Stream GetSerializedJobStream(Guid jobId); IEnumerable FindWithLimitations(JobState jobState, int offset, int count); void SetBinaryJobFile(Guid jobId, byte[] data); IEnumerable FindJobsById(IEnumerable jobIds); bool IsUserAuthorizedForJobs(string userId, params Guid[] jobIds); } }