Package io.split.storages.memory
Class RuleBasedSegmentCacheInMemoryImp
- java.lang.Object
-
- io.split.storages.memory.RuleBasedSegmentCacheInMemoryImp
-
- All Implemented Interfaces:
RuleBasedSegmentCache,RuleBasedSegmentCacheConsumer,RuleBasedSegmentCacheProducer
public class RuleBasedSegmentCacheInMemoryImp extends Object implements RuleBasedSegmentCache
-
-
Constructor Summary
Constructors Constructor Description RuleBasedSegmentCacheInMemoryImp()RuleBasedSegmentCacheInMemoryImp(long startingChangeNumber)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()booleancontains(Set<String> ruleBasedSegmentNames)ParsedRuleBasedSegmentget(String name)Collection<ParsedRuleBasedSegment>getAll()longgetChangeNumber()Set<String>getSegments()booleanremove(String name)List<String>ruleBasedSegmentNames()voidsetChangeNumber(long changeNumber)voidupdate(List<ParsedRuleBasedSegment> toAdd, List<String> toRemove, long changeNumber)
-
-
-
Method Detail
-
remove
public boolean remove(String name)
- Specified by:
removein interfaceRuleBasedSegmentCacheProducer
-
get
public ParsedRuleBasedSegment get(String name)
- Specified by:
getin interfaceRuleBasedSegmentCacheConsumer
-
getAll
public Collection<ParsedRuleBasedSegment> getAll()
- Specified by:
getAllin interfaceRuleBasedSegmentCacheConsumer
-
getChangeNumber
public long getChangeNumber()
- Specified by:
getChangeNumberin interfaceRuleBasedSegmentCacheConsumer- Specified by:
getChangeNumberin interfaceRuleBasedSegmentCacheProducer
-
setChangeNumber
public void setChangeNumber(long changeNumber)
- Specified by:
setChangeNumberin interfaceRuleBasedSegmentCacheProducer
-
ruleBasedSegmentNames
public List<String> ruleBasedSegmentNames()
- Specified by:
ruleBasedSegmentNamesin interfaceRuleBasedSegmentCacheConsumer
-
clear
public void clear()
- Specified by:
clearin interfaceRuleBasedSegmentCacheProducer
-
update
public void update(List<ParsedRuleBasedSegment> toAdd, List<String> toRemove, long changeNumber)
- Specified by:
updatein interfaceRuleBasedSegmentCacheProducer
-
getSegments
public Set<String> getSegments()
- Specified by:
getSegmentsin interfaceRuleBasedSegmentCacheConsumer
-
contains
public boolean contains(Set<String> ruleBasedSegmentNames)
- Specified by:
containsin interfaceRuleBasedSegmentCacheConsumer
-
-