@ThreadSafe public final class FileListCacheValue extends Object implements DeltaAware
Modifier and Type | Class and Description |
---|---|
static class |
FileListCacheValue.Externalizer |
Constructor and Description |
---|
FileListCacheValue()
Constructs a new empty set of filenames
|
FileListCacheValue(String[] listAll)
Initializes a new instance storing the passed values.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(String fileName)
Adds the filename from the set if it exists
|
boolean |
addAndRemove(String toAdd,
String toRemove) |
protected void |
apply(List<org.infinispan.lucene.impl.Operation> operations) |
void |
commit()
Indicate that all deltas collected to date has been extracted (via a call to
DeltaAware.delta() ) and can be
discarded. |
boolean |
contains(String fileName) |
FileListCacheValueDelta |
delta()
Extracts changes made to implementations, in an efficient format that can easily and cheaply be serialized and
deserialized.
|
boolean |
equals(Object obj) |
int |
hashCode() |
boolean |
remove(String fileName)
Removes the filename from the set if it exists
|
String[] |
toArray() |
String |
toString() |
public FileListCacheValue()
public FileListCacheValue(String[] listAll)
listAll
- the strings to store.protected void apply(List<org.infinispan.lucene.impl.Operation> operations)
public boolean remove(String fileName)
fileName
- public boolean add(String fileName)
fileName
- public String[] toArray()
public boolean contains(String fileName)
public FileListCacheValueDelta delta()
DeltaAware
delta
in interface DeltaAware
public void commit()
DeltaAware
DeltaAware.delta()
) and can be
discarded. Often used as an optimization if the delta isn't really needed, but the cleaning and resetting of
internal state is desirable.commit
in interface DeltaAware
Copyright © 2024 JBoss, a division of Red Hat. All rights reserved.