// Retentions do nothing
339381
func (writer *ConsoleWriter) Retentions() int64 {
	writer.lock.RLock()
	defer writer.lock.RUnlock()

	return 0
}
1122059
func (ml *MemoryLogger) Clear() {
	ml.mu.Lock()
	ml.Events = nil
	ml.mu.Unlock()
}
1146644
func (s *GetObjectRetentionOutput) SetRetention(v *ObjectLockRetention) *GetObjectRetentionOutput {
	s.Retention = v
	return s
}
163699
func SetRetentions(retentions int64) {
	singltonLock.RLock()
	defer singltonLock.RUnlock()

	blog.SetRetentions(retentions)
}
975091
func (lru *LRUCache) Evictions() int64 {
	lru.mu.Lock()
	defer lru.mu.Unlock()
	return lru.evictions
}
580357
func (s *DeleteRetentionConfigurationInput) SetRetentionConfigurationName(v string) *DeleteRetentionConfigurationInput {
	s.RetentionConfigurationName = &v
	return s
}
1016077
func (r *SearchRequest) ClearRescorers() *SearchRequest {
	r.searchSource = r.searchSource.ClearRescorers()
	return r
}
389360
func (th *TxHistory) Clear() {
	for i := 0; i < dbtypes.NumIntervals; i++ {
		th.TypeByInterval[i] = nil
		th.AmtFlowByInterval[i] = nil
	}
}
315405
func newRetentionEnforcer(engine Deleter, bucketService BucketFinder) *retentionEnforcer {
	s := &retentionEnforcer{
		Engine:        engine,
		BucketService: bucketService,
		logger:        zap.NewNop(),
	}
	s.metrics = newRetentionMetrics(nil)
	return s
}
1236198
func (s *StreamDescriptionSummary) SetRetentionPeriodHours(v int64) *StreamDescriptionSummary {
	s.RetentionPeriodHours = &v
	return s
}
928859
func (c *Client) SetRetries(count int) {
	if count < 1 {
		c.retries = defaultRetries
	}
	c.retries = count
}
854181
func (s *IncreaseStreamRetentionPeriodInput) SetRetentionPeriodHours(v int64) *IncreaseStreamRetentionPeriodInput {
	s.RetentionPeriodHours = &v
	return s
}
999320
func (s *server) LogEntries() []*LogEntry {
	s.log.mutex.RLock()
	defer s.log.mutex.RUnlock()
	return s.log.entries
}
597729
func ParseRetentions(defs string) (Retentions, error) {
	retentions := make(Retentions, 0)
	for i, def := range strings.Split(defs, ",") {
		def = strings.TrimSpace(def)
		parts := strings.Split(def, ":")
		if len(parts) < 2 || len(parts) > 5 {
			return nil, fmt.Errorf("bad retentions spec %q", def)
		}

		// try old format
		val1, err1 := strconv.ParseInt(parts[0], 10, 0)
		val2, err2 := strconv.ParseInt(parts[1], 10, 0)

		var retention Retention
		var err error
		if err1 == nil && err2 == nil {
			retention = NewRetention(int(val1), int(val2))
		} else {
			// try new format
			retention, err = ParseRetentionNew(def)
			if err != nil {
				return nil, err
			}
		}
		if i != 0 && !schema.IsSpanValid(uint32(retention.SecondsPerPoint)) {
			return nil, fmt.Errorf("invalid retention: can't encode span of %d", retention.SecondsPerPoint)

		}
		if len(parts) >= 3 {
			retention.ChunkSpan, err = dur.ParseNDuration(parts[2])
			if err != nil {
				return nil, err
			}
			if (Month_sec % retention.ChunkSpan) != 0 {
				return nil, errors.New("chunkSpan must fit without remainders into month_sec (28*24*60*60)")
			}
			_, ok := chunk.RevChunkSpans[retention.ChunkSpan]
			if !ok {
				return nil, fmt.Errorf("chunkSpan %s is not a valid value (https://github.com/grafana/metrictank/blob/master/docs/memory-server.md#valid-chunk-spans)", parts[2])
			}
		} else {
			// default to a valid chunkspan that can hold at least 100 points, or select the largest one otherwise.
			approxSpan := uint32(retention.SecondsPerPoint * 100)
			var span uint32
			for _, span = range chunk.ChunkSpans {
				if span >= approxSpan {
					break
				}
			}
			retention.ChunkSpan = span
		}
		retention.NumChunks = 2
		if len(parts) >= 4 {
			i, err := strconv.Atoi(parts[3])
			if err != nil {
				return nil, err
			}
			retention.NumChunks = uint32(i)
		}
		if len(parts) == 5 {
			// user is allowed to specify both a bool or a timestamp.
			// internally we map both to timestamp.
			// 0 (default) is effectively the same as 'true'
			// math.MaxUint32 is effectively the same as 'false'
			readyInt, err := strconv.ParseUint(parts[4], 10, 32)
			if err == nil {
				retention.Ready = uint32(readyInt)
			} else {
				readyBool, err := strconv.ParseBool(parts[4])
				if err != nil {
					return nil, errReadyFormat
				}
				if !readyBool {
					retention.Ready = math.MaxUint32
				}
			}
		}

		retentions = append(retentions, retention)
	}
	return retentions, retentions.Validate()
}
691524
func (s *DeleteStackInput) SetRetainResources(v []*string) *DeleteStackInput {
	s.RetainResources = v
	return s
}
44828
func (ms *MemoryMsgStore) Empty() error {
	ms.Lock()
	if ms.ageTimer != nil {
		if ms.ageTimer.Stop() {
			ms.wg.Done()
		}
		ms.ageTimer = nil
	}
	ms.empty()
	ms.msgs = make(map[uint64]*pb.MsgProto)
	ms.Unlock()
	return nil
}
316047
func (writer *ConsoleWriter) SetRetentions(retentions int64) {
	writer.lock.Lock()
	defer writer.lock.Unlock()

	return
}