caches

package
v0.0.0-...-073a371 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2015 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheStats

type CacheStats struct {
	// contains filtered or unexported fields
}

func NewCacheStats

func NewCacheStats() *CacheStats

func (*CacheStats) Copy

func (c *CacheStats) Copy() *CacheStats

func (*CacheStats) Dump

func (c *CacheStats) Dump() string

func (*CacheStats) DumpDelta

func (c *CacheStats) DumpDelta(prev *CacheStats) string

func (*CacheStats) ReadHitRate

func (c *CacheStats) ReadHitRate() float64

func (*CacheStats) ReadHitRateDelta

func (c *CacheStats) ReadHitRateDelta(prev *CacheStats) float64

func (*CacheStats) String

func (c *CacheStats) String() string

func (*CacheStats) WriteHitRate

func (c *CacheStats) WriteHitRate() float64

func (*CacheStats) WriteHitRateDelta

func (c *CacheStats) WriteHitRateDelta(prev *CacheStats) float64

type Caches

type Caches interface {
	Write(obj, chunk string)
	Read(obj, chunk string) bool
	Delete(obj string)
	String() string
	Stats() *CacheStats
	StatsClear()
	Close()
}

type IoCache

type IoCache struct {
	// contains filtered or unexported fields
}

func NewIoCache

func NewIoCache(cachesize uint64, writethrough bool) *IoCache

func (*IoCache) Close

func (s *IoCache) Close()

func (*IoCache) Delete

func (c *IoCache) Delete(obj string)

func (*IoCache) Insert

func (c *IoCache) Insert(key string)

func (*IoCache) Invalidate

func (c *IoCache) Invalidate(key string)

func (*IoCache) Read

func (c *IoCache) Read(obj, chunk string) bool

func (*IoCache) Stats

func (c *IoCache) Stats() *CacheStats

func (*IoCache) StatsClear

func (c *IoCache) StatsClear()

func (*IoCache) String

func (c *IoCache) String() string

func (*IoCache) Write

func (c *IoCache) Write(obj, chunk string)

type IoCacheBlockInfo

type IoCacheBlockInfo struct {
	// contains filtered or unexported fields
}

--------------------------------------------------------

type IoCacheBlocks

type IoCacheBlocks struct {
	// contains filtered or unexported fields
}

func NewIoCacheBlocks

func NewIoCacheBlocks(cachesize uint64) *IoCacheBlocks

func (*IoCacheBlocks) Free

func (c *IoCacheBlocks) Free(index uint64)

func (*IoCacheBlocks) Insert

func (c *IoCacheBlocks) Insert(key string) (evictkey string, newindex uint64, err error)

func (*IoCacheBlocks) Using

func (c *IoCacheBlocks) Using(index uint64)

type IoCacheKvDB

type IoCacheKvDB struct {
	// contains filtered or unexported fields
}

func NewIoCacheKvDB

func NewIoCacheKvDB(cachesize, bcsize uint64, writethrough bool, chunksize uint32, dbtype string) *IoCacheKvDB

func (*IoCacheKvDB) Close

func (c *IoCacheKvDB) Close()

func (*IoCacheKvDB) Delete

func (c *IoCacheKvDB) Delete(obj string)

func (*IoCacheKvDB) Insert

func (c *IoCacheKvDB) Insert(key string)

func (*IoCacheKvDB) Invalidate

func (c *IoCacheKvDB) Invalidate(key string)

func (*IoCacheKvDB) Read

func (c *IoCacheKvDB) Read(obj, chunk string) bool

func (*IoCacheKvDB) Stats

func (c *IoCacheKvDB) Stats() *CacheStats

func (*IoCacheKvDB) StatsClear

func (c *IoCacheKvDB) StatsClear()

func (*IoCacheKvDB) String

func (c *IoCacheKvDB) String() string

func (*IoCacheKvDB) Write

func (c *IoCacheKvDB) Write(obj string, chunk string)

type NullCache

type NullCache struct {
	// contains filtered or unexported fields
}

func NewNullCache

func NewNullCache() *NullCache

func (*NullCache) Close

func (n *NullCache) Close()

func (*NullCache) Delete

func (c *NullCache) Delete(obj string)

func (*NullCache) Evict

func (c *NullCache) Evict()

func (*NullCache) Insert

func (c *NullCache) Insert(chunkkey string)

func (*NullCache) Invalidate

func (c *NullCache) Invalidate(chunkkey string)

func (*NullCache) Read

func (c *NullCache) Read(obj, chunk string) bool

func (*NullCache) Stats

func (c *NullCache) Stats() *CacheStats

func (*NullCache) StatsClear

func (c *NullCache) StatsClear()

func (*NullCache) String

func (c *NullCache) String() string

func (*NullCache) Write

func (c *NullCache) Write(obj, chunk string)

type SimpleCache

type SimpleCache struct {
	// contains filtered or unexported fields
}

func NewSimpleCache

func NewSimpleCache(cachesize uint64, writethrough bool) *SimpleCache

func (*SimpleCache) Close

func (s *SimpleCache) Close()

func (*SimpleCache) Delete

func (c *SimpleCache) Delete(obj string)

func (*SimpleCache) Evict

func (c *SimpleCache) Evict()

func (*SimpleCache) Insert

func (c *SimpleCache) Insert(chunkkey string)

func (*SimpleCache) Invalidate

func (c *SimpleCache) Invalidate(chunkkey string)

func (*SimpleCache) Read

func (c *SimpleCache) Read(obj, chunk string) bool

func (*SimpleCache) Stats

func (c *SimpleCache) Stats() *CacheStats

func (*SimpleCache) StatsClear

func (c *SimpleCache) StatsClear()

func (*SimpleCache) String

func (c *SimpleCache) String() string

func (*SimpleCache) Write

func (c *SimpleCache) Write(obj, chunk string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL