DurableObjectStorage

external interface DurableObjectStorage

Functions

Link copied to clipboard
abstract fun delete(keys: Array<String>): Promise<Number>
abstract fun delete(key: String): Promise<Boolean>
abstract fun delete(keys: Array<String>, options: DurableObjectPutOptions = definedExternally): Promise<Number>
abstract fun delete(key: String, options: DurableObjectPutOptions = definedExternally): Promise<Boolean>
Link copied to clipboard
abstract fun deleteAlarm(options: DurableObjectSetAlarmOptions = definedExternally): Promise<Unit>
Link copied to clipboard
abstract fun deleteAll(options: DurableObjectPutOptions = definedExternally): Promise<Unit>
Link copied to clipboard
abstract fun <T> get(keys: Array<String>): Promise<Map<String, T>>
abstract fun <T> get(key: String): Promise<T?>
abstract fun <T> get(keys: Array<String>, options: DurableObjectGetOptions = definedExternally): Promise<Map<String, T>>
abstract fun <T> get(key: String, options: DurableObjectGetOptions = definedExternally): Promise<T?>
Link copied to clipboard
abstract fun getAlarm(options: DurableObjectGetAlarmOptions = definedExternally): Promise<Number?>
Link copied to clipboard
abstract fun <T> list(options: DurableObjectListOptions = definedExternally): Promise<Map<String, T>>
Link copied to clipboard
abstract fun <T : Any> put(entries: Record<String, T>): Promise<Unit>
abstract fun <T : Any> put(entries: Record<String, T>, options: DurableObjectPutOptions = definedExternally): Promise<Unit>
abstract fun <T> put(key: String, value: T): Promise<Unit>
abstract fun <T> put(key: String, value: T, options: DurableObjectPutOptions = definedExternally): Promise<Unit>
Link copied to clipboard
abstract fun setAlarm(scheduledTime: Number): Promise<Unit>
abstract fun setAlarm(scheduledTime: Date): Promise<Unit>
abstract fun setAlarm(scheduledTime: Number, options: DurableObjectSetAlarmOptions = definedExternally): Promise<Unit>
abstract fun setAlarm(scheduledTime: Date, options: DurableObjectSetAlarmOptions = definedExternally): Promise<Unit>
Link copied to clipboard
abstract fun sync(): Promise<Unit>
Link copied to clipboard
abstract fun <T> transaction(closure: (txn: DurableObjectTransaction) -> Promise<T>): Promise<T>
Link copied to clipboard
abstract fun <T> transactionSync(closure: () -> T): T