Package org.nuxeo.ecm.core.storage.sql
Class VCSInvalidations
- java.lang.Object
-
- org.nuxeo.ecm.core.storage.sql.VCSInvalidations
-
- All Implemented Interfaces:
Serializable
,SerializableAccumulableInvalidations
,SerializableMessage
public class VCSInvalidations extends Object implements SerializableAccumulableInvalidations
A set of invalidations.Records both modified and deleted fragments, as well as "parents modified" fragments.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description boolean
all
Used locally when invalidating everything, or when too many invalidations have been received.Set<RowId>
deleted
null when emptystatic int
DELETED
static int
MAX_SIZE
Maximum number of invalidations kept, after which onlyall
is set.Set<RowId>
modified
null when emptystatic 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 Summary
Constructors Constructor Description VCSInvalidations()
VCSInvalidations(boolean all)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(Serializable id, String[] tableNames, int kind)
void
add(SerializableAccumulableInvalidations o)
Adds other invalidations to this one.void
addDeleted(RowId rowId)
void
addModified(RowId rowId)
protected void
checkMaxSize()
void
clear()
static VCSInvalidations
deserialize(InputStream in)
Set<RowId>
getKindSet(int kind)
only call this if it's to add at least one element in the setboolean
isEmpty()
Checks if this contains no invalidations.void
serialize(OutputStream out)
Serializes this to an output stream.protected void
setAll()
String
toString()
-
-
-
Field Detail
-
PARENT
public static final String PARENT
Pseudo-table for children invalidation.- See Also:
- Constant Field Values
-
SERIES_PROXIES
public static final String SERIES_PROXIES
Pseudo-table for series proxies invalidation.- See Also:
- Constant Field Values
-
TARGET_PROXIES
public static final String TARGET_PROXIES
Pseudo-table for target proxies invalidation.- See Also:
- Constant Field Values
-
MODIFIED
public static final int MODIFIED
- See Also:
- Constant Field Values
-
DELETED
public static final int DELETED
- See Also:
- Constant Field Values
-
MAX_SIZE
public static final int MAX_SIZE
Maximum number of invalidations kept, after which onlyall
is set. This avoids accumulating too many invalidations in memory, at the expense of more coarse-grained invalidations.- See Also:
- Constant Field Values
-
all
public boolean all
Used locally when invalidating everything, or when too many invalidations have been received.
-
-
Method Detail
-
isEmpty
public boolean isEmpty()
Description copied from interface:SerializableAccumulableInvalidations
Checks if this contains no invalidations.- Specified by:
isEmpty
in interfaceSerializableAccumulableInvalidations
-
clear
public void clear()
-
setAll
protected void setAll()
-
checkMaxSize
protected void checkMaxSize()
-
getKindSet
public Set<RowId> getKindSet(int kind)
only call this if it's to add at least one element in the set
-
add
public void add(SerializableAccumulableInvalidations o)
Description copied from interface:SerializableAccumulableInvalidations
Adds other invalidations to this one.- Specified by:
add
in interfaceSerializableAccumulableInvalidations
-
addModified
public void addModified(RowId rowId)
-
addDeleted
public void addDeleted(RowId rowId)
-
add
public void add(Serializable id, String[] tableNames, int kind)
-
serialize
public void serialize(OutputStream out) throws IOException
Description copied from interface:SerializableMessage
Serializes this to an output stream. The deserialization is handled byAbstractPubSubBroker.deserialize(java.io.InputStream)
.- Specified by:
serialize
in interfaceSerializableMessage
- Throws:
IOException
-
deserialize
public static VCSInvalidations deserialize(InputStream in) throws IOException
- Throws:
IOException
-
-