All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.insanusmokrassar.iobjectk.realisations.ConcurrentSimpleIObject.kt Maven / Gradle / Ivy

package com.github.insanusmokrassar.iobjectk.realisations

import com.github.insanusmokrassar.iobjectk.exceptions.ReadException
import com.github.insanusmokrassar.iobjectk.exceptions.WriteException
import com.github.insanusmokrassar.iobjectk.interfaces.IObject

class ConcurrentSimpleIObject : SimpleIObject {

    constructor(from: Map) : super(from) {}

    constructor(from: IObject) : super(from) {}

    constructor() : super() {}

    @Synchronized @Throws(WriteException::class)
    override fun put(key: String, value: Any) {
        super.put(key, value)
    }

    @Synchronized @Throws(WriteException::class)
    override fun putAll(toPutMap: Map) {
        super.putAll(toPutMap)
    }

    @Synchronized @Throws(ReadException::class)
    override operator fun get(key: String): T {
        return super.get(key)
    }

    @Synchronized @Throws(WriteException::class)
    override fun remove(key: String) {
        super.remove(key)
    }

    @Synchronized override fun keys(): Set {
        return super.keys()
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy