CacheImporter

@Singleton
class CacheImporter @Inject constructor(database: Database, alloc: ByteBufAllocator)

Constructors

Link copied to clipboard
@Inject
constructor(database: Database, alloc: ByteBufAllocator)

Types

Link copied to clipboard
class Archive(val id: Int, buf: ByteBuf, val versionList: VersionList?) : CacheImporter.Blob
Link copied to clipboard
abstract class Blob(buf: ByteBuf) : DefaultByteBufHolder
Link copied to clipboard
class ChecksumTableBlob(buf: ByteBuf, val table: ChecksumTable) : CacheImporter.Blob
Link copied to clipboard
object Companion
Link copied to clipboard
abstract class Container(compressed: ByteBuf, uncompressed: ByteBuf?)
Link copied to clipboard
class File(val index: Int, val file: Int, buf: ByteBuf, val version: Int) : CacheImporter.Blob
Link copied to clipboard
open class Group(val archive: Int, val group: Int, compressed: ByteBuf, uncompressed: ByteBuf?, val version: Int, val versionTruncated: Boolean) : CacheImporter.Container
Link copied to clipboard
class Index(val archive: Int, val index: Js5Index, compressed: ByteBuf, uncompressed: ByteBuf) : CacheImporter.Group
Link copied to clipboard
data class MasterIndexResult(val masterIndexId: Int, val sourceId: Int, val indexes: List<ByteBuf?>)

Functions

Link copied to clipboard
fun addBlob(connection: Connection, blob: CacheImporter.Blob): Long
Link copied to clipboard
fun addBlobs(connection: Connection, blobs: List<CacheImporter.Blob>): List<Long>
Link copied to clipboard
suspend fun import(store: Store, gameName: String, environment: String, language: String, buildMajor: Int?, buildMinor: Int?, timestamp: Instant?, name: String?, description: String?, url: String?)
Link copied to clipboard
suspend fun importGroups(scopeId: Int, sourceId: Int, groups: List<CacheImporter.Group>)
Link copied to clipboard
suspend fun importIndexAndGetMissingGroups(scopeId: Int, sourceId: Int, archive: Int, index: Js5Index, buf: ByteBuf, uncompressed: ByteBuf, lastMasterIndexId: Int?): List<Int>
Link copied to clipboard
suspend fun importMasterIndex(buf: ByteBuf, format: MasterIndexFormat, gameName: String, environment: String, language: String, buildMajor: Int?, buildMinor: Int?, timestamp: Instant?, name: String?, description: String?, url: String?)
Link copied to clipboard
suspend fun importMasterIndexAndGetIndexes(masterIndex: Js5MasterIndex, buf: ByteBuf, uncompressed: ByteBuf, gameId: Int, scopeId: Int, buildMajor: Int, buildMinor: Int?, lastId: Int?, timestamp: Instant): CacheImporter.MasterIndexResult
Link copied to clipboard
suspend fun refreshViews()
Link copied to clipboard
suspend fun setLastMasterIndexId(gameId: Int, masterIndexId: Int)