Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Monitor ¶
type Monitor interface {
StoreDataFlushed(timestamp time.Time, countFlushed int, countInStorage int64)
Lambda() float64
Acquire() bool
Release()
Busy() bool
}
Monitor specifies the interface for a lambda calculator
type MonitorImpl ¶
type MonitorImpl struct {
// contains filtered or unexported fields
}
MonitorImpl struct that will has a window of statistics for eviction lambda calculation
func (*MonitorImpl) Acquire ¶
func (m *MonitorImpl) Acquire() bool
Acquire requests permission to flush whichever resource this monitor is associated to
func (*MonitorImpl) Busy ¶
func (m *MonitorImpl) Busy() bool
Busy returns true if the permission is currently acquired and hasn't yet been released
func (*MonitorImpl) Lambda ¶
func (m *MonitorImpl) Lambda() float64
Lambda the returns the last known lambda value
func (*MonitorImpl) Release ¶
func (m *MonitorImpl) Release()
Release signals the end of a syncrhonization operation which was previously acquired
func (*MonitorImpl) StoreDataFlushed ¶
func (m *MonitorImpl) StoreDataFlushed(timestamp time.Time, countFlushed int, countInStorage int64)
StoreDataFlushed stores data flushed into the monitor
Click to show internal directories.
Click to hide internal directories.