public class MaterializedViewManager
extends java.lang.Object
MaterializedView
's for a single ColumnFamilyStore
. All of the materialized views for that
table are created when this manager is initialized.
The main purposes of the manager are to provide a single location for updates to be vetted to see whether they update
any views updateAffectsView(PartitionUpdate)
, provide locks to prevent multiple
updates from creating incoherent updates in the view acquireLockFor(ByteBuffer)
, and
to affect change on the view.Constructor and Description |
---|
MaterializedViewManager(ColumnFamilyStore baseCfs) |
Modifier and Type | Method and Description |
---|---|
static java.util.concurrent.locks.Lock |
acquireLockFor(java.nio.ByteBuffer key) |
void |
addMaterializedView(MaterializedViewDefinition definition) |
java.lang.Iterable<MaterializedView> |
allViews() |
java.lang.Iterable<ColumnFamilyStore> |
allViewsCfs() |
void |
buildAllViews() |
void |
dumpMemtables() |
void |
forceBlockingFlush() |
void |
init() |
void |
invalidate() |
void |
pushViewReplicaUpdates(java.nio.ByteBuffer key,
PartitionUpdate update)
Calculates and pushes updates to the views replicas.
|
void |
reload() |
void |
removeMaterializedView(java.lang.String name) |
void |
truncateBlocking(long truncatedAt) |
boolean |
updateAffectsView(PartitionUpdate upd) |
static boolean |
updatesAffectView(java.util.Collection<? extends IMutation> mutations,
boolean ignoreRf1) |
public MaterializedViewManager(ColumnFamilyStore baseCfs)
public java.lang.Iterable<MaterializedView> allViews()
public java.lang.Iterable<ColumnFamilyStore> allViewsCfs()
public void init()
public void invalidate()
public void reload()
public void buildAllViews()
public void removeMaterializedView(java.lang.String name)
public void addMaterializedView(MaterializedViewDefinition definition)
public void pushViewReplicaUpdates(java.nio.ByteBuffer key, PartitionUpdate update) throws UnavailableException, OverloadedException, WriteTimeoutException
MaterializedViewUtils.getViewNaturalEndpoint(String, Token, Token)
.public boolean updateAffectsView(PartitionUpdate upd)
public static java.util.concurrent.locks.Lock acquireLockFor(java.nio.ByteBuffer key)
public static boolean updatesAffectView(java.util.Collection<? extends IMutation> mutations, boolean ignoreRf1)
public void forceBlockingFlush()
public void dumpMemtables()
public void truncateBlocking(long truncatedAt)
Copyright © 2015 The Apache Software Foundation