Versions in this module Expand all Collapse all v0 v0.1.11 Oct 3, 2023 v0.1.10 Oct 2, 2023 Changes in this version + func NewStoreWithRealm(store kvstore.KVStore, packagePrefix byte, storagePrefix byte) kvstore.KVStore + type CachedObject struct + func NewEmptyCachedObject(key []byte) (result *CachedObject[T]) + func (c *CachedObject[T]) BatchWrite(batchedMuts kvstore.BatchedMutations) + func (c *CachedObject[T]) BatchWriteDone() + func (c *CachedObject[T]) BatchWriteScheduled() bool + func (c *CachedObject[T]) Consume(consumer func(T), forceRelease ...bool) bool + func (c *CachedObject[T]) Exists() bool + func (c *CachedObject[T]) Get() (result T) + func (c *CachedObject[T]) Key() []byte + func (c *CachedObject[T]) RTransaction(callback func(object T), identifiers ...interface{}) *CachedObject[T] + func (c *CachedObject[T]) Release(force ...bool) + func (c *CachedObject[T]) ResetBatchWriteScheduled() + func (c *CachedObject[T]) Retain() *CachedObject[T] + func (c *CachedObject[T]) Transaction(callback func(object T), identifiers ...interface{}) *CachedObject[T] + func (c *CachedObject[T]) Unwrap() (result T, exists bool) + type CachedObjects []*CachedObject[T] + func (c CachedObjects[T]) Consume(consumer func(T), forceRelease ...bool) (consumed bool) + func (c CachedObjects[T]) Exists() (exists []bool) + func (c CachedObjects[T]) Release(force ...bool) + func (c CachedObjects[T]) String() string + func (c CachedObjects[T]) Unwrap(skip ...bool) (unwrappedChildBranches []T) + type Events = objectstorage.Events + type IteratorOption = objectstorage.IteratorOption + func WithIteratorMaxIterations(maxIterations int) IteratorOption + func WithIteratorPrefix(prefix []byte) IteratorOption + func WithIteratorSkipCache(skipCache bool) IteratorOption + func WithIteratorSkipStorage(skipStorage bool) IteratorOption + type IteratorOptions = objectstorage.IteratorOptions + type LeakDetectionOptions = objectstorage.LeakDetectionOptions + type LeakDetectionWrapper = objectstorage.LeakDetectionWrapper + type ObjectStorage struct + Events *Events + func NewInterfaceStorage(store kvstore.KVStore, objectFactory StorableObjectFactory, ...) (newObjectStorage *ObjectStorage[T]) + func NewStructStorage(store kvstore.KVStore, optionalOptions ...Option) (newObjectStorage *ObjectStorage[T]) + func (o *ObjectStorage[T]) ComputeIfAbsent(key []byte, remappingFunction func(key []byte) T) *CachedObject[T] + func (o *ObjectStorage[T]) Contains(key []byte, options ...ReadOption) (result bool) + func (o *ObjectStorage[T]) Delete(key []byte) + func (o *ObjectStorage[T]) DeleteIfPresent(key []byte) bool + func (o *ObjectStorage[T]) DeleteIfPresentAndReturn(key []byte) T + func (o *ObjectStorage[T]) Flush() + func (o *ObjectStorage[T]) ForEach(consumer func(key []byte, cachedObject *CachedObject[T]) bool, ...) + func (o *ObjectStorage[T]) ForEachKeyOnly(consumer func(key []byte) bool, options ...IteratorOption) + func (o *ObjectStorage[T]) FreeMemory() + func (o *ObjectStorage[T]) Get(key []byte) *CachedObject[T] + func (o *ObjectStorage[T]) GetSize() int + func (o *ObjectStorage[T]) Load(key []byte) *CachedObject[T] + func (o *ObjectStorage[T]) Prune() error + func (o *ObjectStorage[T]) Put(object T) *CachedObject[T] + func (o *ObjectStorage[T]) ReleaseExecutor() (releaseExecutor *timed.Executor) + func (o *ObjectStorage[T]) Shutdown() + func (o *ObjectStorage[T]) Store(object T) *CachedObject[T] + func (o *ObjectStorage[T]) StoreIfAbsent(object T) (result *CachedObject[T], stored bool) + type Option = objectstorage.Option + func CacheTime(duration time.Duration) Option + func KeysOnly(keysOnly bool) Option + func LeakDetectionEnabled(leakDetectionEnabled bool, options ...LeakDetectionOptions) Option + func LogAccess(fileName string, commandsFilter ...debug.Command) Option + func OnEvictionCallback(cb func(cachedObject *CachedObject[T])) Option + func OverrideLeakDetectionWrapper(wrapperFunc func(cachedObject *CachedObject[T]) LeakDetectionWrapper) Option + func PartitionKey(keyPartitions ...int) Option + func PersistenceEnabled(persistenceEnabled bool) Option + func ReleaseExecutorWorkerCount(releaseExecutorWorkerCount int) Option + func StoreOnCreation(store bool) Option + type Options = objectstorage.Options + type PtrStorableObject interface + type ReadOption = objectstorage.ReadOption + func WithReadSkipCache(skipCache bool) ReadOption + func WithReadSkipStorage(skipStorage bool) ReadOption + type ReadOptions = objectstorage.ReadOptions + type StorableObject interface + FromObjectStorage func(key, data []byte) error + type StorableObjectFactory func(key []byte, data []byte) (result StorableObject, err error) + type StorableObjectFlags = objectstorage.StorableObjectFlags