Package org.nuxeo.ecm.core.storage.dbs
Class DBSInvalidations
- java.lang.Object
-
- org.nuxeo.ecm.core.storage.dbs.DBSInvalidations
-
- All Implemented Interfaces:
Serializable
,SerializableAccumulableInvalidations
,SerializableMessage
public class DBSInvalidations extends Object implements SerializableAccumulableInvalidations
A set of invalidations for a given repository.Records both modified and deleted fragments, as well as "parents modified" fragments.
- Since:
- 8.10
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DBSInvalidations()
DBSInvalidations(boolean all)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(String id)
void
add(SerializableAccumulableInvalidations o)
Adds other invalidations to this one.void
addAll(Collection<String> idsToAdd)
protected void
checkMaxSize()
void
clear()
static DBSInvalidations
deserialize(InputStream in)
boolean
isEmpty()
Checks if this contains no invalidations.void
serialize(OutputStream out)
Serializes this to an output stream.protected void
setAll()
String
toString()
-
-
-
Field Detail
-
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()
-
add
public void add(SerializableAccumulableInvalidations o)
Description copied from interface:SerializableAccumulableInvalidations
Adds other invalidations to this one.- Specified by:
add
in interfaceSerializableAccumulableInvalidations
-
add
public void add(String id)
-
addAll
public void addAll(Collection<String> idsToAdd)
-
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 DBSInvalidations deserialize(InputStream in) throws IOException
- Throws:
IOException
-
-