OffloadingServiceRepositoryImpl

@Singleton
class OffloadingServiceRepositoryImpl @Inject constructor(offloadingServiceDao: OffloadingServiceDao) : OffloadingServiceRepository

The class that implements the OffloadingServiceRepository interface.

Parameters

offloadingServiceDao

The OffloadingServiceDao object that is used to access the database.

Constructors

Link copied to clipboard
@Inject
constructor(offloadingServiceDao: OffloadingServiceDao)

Creates a singleton instance of the OffloadingServiceRepositoryImpl class.

Functions

Link copied to clipboard
open override fun changeStateOffloadingService(serviceId: Int, state: Pipeline.State)

Changes the state of an OffloadingService by using offloadingServiceDao.

Link copied to clipboard
open suspend override fun deleteOffloadingService(serviceId: Int)

Delete an OffloadingService from the offloadingservices table based on its ID by using offloadingServiceDao.

Link copied to clipboard
open override fun getAllOffloadingService(): Flow<List<OffloadingService>>

Get the stream of all OffloadingServices in the database by using offloadingServiceDao.

Link copied to clipboard
open override fun getOffloadingService(serviceId: Int): Flow<OffloadingService>

Get the stream of OffloadingServices by serviceId from the database by using offloadingServiceDao.

Link copied to clipboard
open suspend override fun insertOffloadingService(offloadingService: OffloadingService)

Insert a OffloadingService into the database by using offloadingServiceDao.

Link copied to clipboard
open suspend override fun updateOffloadingService(offloadingService: OffloadingService)

Update the given OffloadingService in the database by using offloadingServiceDao.