Constructor and Description |
---|
TableViews(CFMetaData baseTableMetadata) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(View view) |
java.lang.Iterable<ColumnFamilyStore> |
allViewsCfs() |
boolean |
contains(java.lang.String viewName) |
void |
dumpMemtables() |
void |
forceBlockingFlush() |
java.util.Iterator<java.util.Collection<Mutation>> |
generateViewUpdates(java.util.Collection<View> views,
UnfilteredRowIterator updates,
UnfilteredRowIterator existings,
int nowInSec,
boolean separateUpdates)
Given some updates on the base table of this object and the existing values for the rows affected by that update, generates the
mutation to be applied to the provided views.
|
java.util.Iterator<View> |
iterator() |
void |
pushViewReplicaUpdates(PartitionUpdate update,
boolean writeCommitLog,
java.util.concurrent.atomic.AtomicLong baseComplete)
Calculates and pushes updates to the views replicas.
|
void |
removeByName(java.lang.String viewName) |
int |
size() |
void |
truncateBlocking(ReplayPosition replayAfter,
long truncatedAt) |
java.util.Collection<View> |
updatedViews(PartitionUpdate updates)
Return the views that are potentially updated by the provided updates.
|
addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public TableViews(CFMetaData baseTableMetadata)
public int size()
public java.util.Iterator<View> iterator()
public boolean contains(java.lang.String viewName)
public boolean add(View view)
public java.lang.Iterable<ColumnFamilyStore> allViewsCfs()
public void forceBlockingFlush()
public void dumpMemtables()
public void truncateBlocking(ReplayPosition replayAfter, long truncatedAt)
public void removeByName(java.lang.String viewName)
public void pushViewReplicaUpdates(PartitionUpdate update, boolean writeCommitLog, java.util.concurrent.atomic.AtomicLong baseComplete)
ViewUtils.getViewNaturalEndpoint(String, Token, Token)
.update
- an update on the base table represented by this object.writeCommitLog
- whether we should write the commit log for the view updates.baseComplete
- time from epoch in ms that the local base mutation was (or will be) completedpublic java.util.Iterator<java.util.Collection<Mutation>> generateViewUpdates(java.util.Collection<View> views, UnfilteredRowIterator updates, UnfilteredRowIterator existings, int nowInSec, boolean separateUpdates)
views
- the views potentially affected by updates
.updates
- the base table updates being applied.existings
- the existing values for the rows affected by updates
. This is used to decide if a view is
obsoleted by the update and should be removed, gather the values for columns that may not be part of the update if
a new view entry needs to be created, and compute the minimal updates to be applied if the view entry isn't changed
but has simply some updated values. This will be empty for view building as we want to assume anything we'll pass
to updates
is new.nowInSec
- the current time in seconds.views
. This can be empty.public java.util.Collection<View> updatedViews(PartitionUpdate updates)
updates
- the updates applied to the base table.updates
.Copyright © 2017 The Apache Software Foundation