public class Invalidations extends Object implements SerializableAccumulableInvalidations
Records both modified and deleted fragments, as well as "parents modified" fragments.
| Modifier and Type | Field and Description | 
|---|---|
boolean | 
all
Used locally when invalidating everything, or when too many invalidations have been received. 
 | 
Set<RowId> | 
deleted
null when empty 
 | 
static int | 
DELETED  | 
static int | 
MAX_SIZE
Maximum number of invalidations kept, after which only  
all is set. | 
Set<RowId> | 
modified
null when empty 
 | 
static int | 
MODIFIED  | 
static String | 
PARENT
Pseudo-table for children invalidation. 
 | 
static String | 
SERIES_PROXIES
Pseudo-table for series proxies invalidation. 
 | 
static String | 
TARGET_PROXIES
Pseudo-table for target proxies invalidation. 
 | 
| Constructor and Description | 
|---|
Invalidations()  | 
Invalidations(boolean all)  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
add(SerializableAccumulableInvalidations o)
Adds other invalidations to this one. 
 | 
void | 
add(Serializable id,
   String[] tableNames,
   int kind)  | 
void | 
addDeleted(RowId rowId)  | 
void | 
addModified(RowId rowId)  | 
protected void | 
checkMaxSize()  | 
void | 
clear()  | 
static Invalidations | 
deserialize(InputStream in)  | 
Set<RowId> | 
getKindSet(int kind)
only call this if it's to add at least one element in the set 
 | 
boolean | 
isEmpty()
Checks if this contains no invalidations. 
 | 
void | 
serialize(OutputStream out)
Serializes this to an output stream. 
 | 
protected void | 
setAll()  | 
String | 
toString()  | 
public static final String PARENT
public static final String SERIES_PROXIES
public static final String TARGET_PROXIES
public static final int MODIFIED
public static final int DELETED
public static final int MAX_SIZE
all is set. This avoids accumulating too many
 invalidations in memory, at the expense of more coarse-grained invalidations.public boolean all
public Invalidations()
public Invalidations(boolean all)
public boolean isEmpty()
SerializableAccumulableInvalidationsisEmpty in interface SerializableAccumulableInvalidationspublic void clear()
protected void setAll()
protected void checkMaxSize()
public Set<RowId> getKindSet(int kind)
public void add(SerializableAccumulableInvalidations o)
SerializableAccumulableInvalidationsadd in interface SerializableAccumulableInvalidationspublic void addModified(RowId rowId)
public void addDeleted(RowId rowId)
public void add(Serializable id, String[] tableNames, int kind)
public void serialize(OutputStream out) throws IOException
SerializableMessageAbstractPubSubBroker.deserialize(java.io.InputStream).serialize in interface SerializableMessageIOExceptionpublic static Invalidations deserialize(InputStream in) throws IOException
IOExceptionCopyright © 2019 Nuxeo. All rights reserved.