public class ViewManager
extends java.lang.Object
View's for a single ColumnFamilyStore. All of the 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 updatesAffectView(Collection, boolean), provide locks to prevent multiple
updates from creating incoherent updates in the view acquireLockFor(ByteBuffer), and
to affect change on the view.| Modifier and Type | Class and Description |
|---|---|
class |
ViewManager.ForStore |
| Constructor and Description |
|---|
ViewManager(Keyspace keyspace) |
| Modifier and Type | Method and Description |
|---|---|
static java.util.concurrent.locks.Lock |
acquireLockFor(java.nio.ByteBuffer key) |
void |
addView(ViewDefinition definition) |
java.lang.Iterable<View> |
allViews() |
void |
buildAllViews() |
ViewManager.ForStore |
forTable(java.util.UUID baseId) |
void |
pushViewReplicaUpdates(PartitionUpdate update,
boolean writeCommitLog,
java.util.concurrent.atomic.AtomicLong baseComplete)
Calculates and pushes updates to the views replicas.
|
void |
reload() |
void |
removeView(java.lang.String name) |
void |
update(java.lang.String viewName) |
boolean |
updatesAffectView(java.util.Collection<? extends IMutation> mutations,
boolean coordinatorBatchlog) |
public ViewManager(Keyspace keyspace)
public void pushViewReplicaUpdates(PartitionUpdate update, boolean writeCommitLog, java.util.concurrent.atomic.AtomicLong baseComplete)
ViewUtils.getViewNaturalEndpoint(String, Token, Token).public boolean updatesAffectView(java.util.Collection<? extends IMutation> mutations, boolean coordinatorBatchlog)
public java.lang.Iterable<View> allViews()
public void update(java.lang.String viewName)
public void reload()
public void addView(ViewDefinition definition)
public void removeView(java.lang.String name)
public void buildAllViews()
public ViewManager.ForStore forTable(java.util.UUID baseId)
public static java.util.concurrent.locks.Lock acquireLockFor(java.nio.ByteBuffer key)
Copyright © 2016 The Apache Software Foundation