T
- key for propagation: could be simple resource or pair (resource, connObjectKeyValue) for linked accountspublic class PropagationByResource<T extends Serializable> extends Object implements Serializable
Constructor and Description |
---|
PropagationByResource()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(ResourceOperation type,
T key)
Add an element.
|
boolean |
addAll(ResourceOperation type,
Collection<T> keys)
Add some elements.
|
void |
addOldConnObjectKey(String resourceKey,
String oldConnObjectKey)
Add old ConnObjectKey for a given resource name.
|
Map<T,ResourceOperation> |
asMap() |
void |
clear()
Removes all of the operations.
|
boolean |
contains(ResourceOperation type,
T key) |
boolean |
contains(T key) |
Set<T> |
get(ResourceOperation type)
Get resources for a given resource operation type.
|
String |
getOldConnObjectKey(String resourceKey)
Fetch old connObjectKey for given resource name.
|
Map<String,String> |
getOldConnObjectKeys()
Fetch all old connObjectKeys.
|
boolean |
isEmpty()
Whether no operations are present.
|
void |
merge(PropagationByResource<T> propByRes)
Merge another resource operation instance into this instance.
|
void |
purge()
Avoid potential conflicts by not doing create or update on any resource for which a delete is requested, and by
not doing any create on any resource for which an update is requested.
|
boolean |
remove(ResourceOperation type,
T key)
Remove an element.
|
boolean |
removeAll(Collection<T> keys)
Removes only the resource names in the underlying resource name sets that are contained in the specified
collection.
|
boolean |
removeAll(ResourceOperation type,
Set<T> keys)
Remove some elements.
|
boolean |
retainAll(Collection<T> keys)
Retains only the resource names in the underlying resource name sets that are contained in the specified
collection.
|
void |
set(ResourceOperation type,
Collection<T> keys)
Set resources for a given resource operation type.
|
String |
toString() |
public final void purge()
public final boolean add(ResourceOperation type, T key)
type
- resource operation typekey
- target resourcepublic boolean addAll(ResourceOperation type, Collection<T> keys)
type
- resource operation typekeys
- target resourcespublic final boolean remove(ResourceOperation type, T key)
type
- resource operation typekey
- target resourcepublic boolean removeAll(ResourceOperation type, Set<T> keys)
type
- resource operation typekeys
- target resourcespublic boolean removeAll(Collection<T> keys)
keys
- collection containing resource names to be retained in the underlying resource name setsCollection.removeAll(java.util.Collection)
public boolean retainAll(Collection<T> keys)
keys
- collection containing resource names to be retained in the underlying resource name setsCollection.retainAll(java.util.Collection)
public boolean contains(ResourceOperation type, T key)
public boolean contains(T key)
public final Set<T> get(ResourceOperation type)
type
- resource operation typepublic Map<T,ResourceOperation> asMap()
public final void set(ResourceOperation type, Collection<T> keys)
type
- resource operation typekeys
- to be setpublic final void merge(PropagationByResource<T> propByRes)
propByRes
- to be mergedpublic void clear()
public final boolean isEmpty()
public Map<String,String> getOldConnObjectKeys()
public String getOldConnObjectKey(String resourceKey)
resourceKey
- resource namepublic void addOldConnObjectKey(String resourceKey, String oldConnObjectKey)
resourceKey
- resourceKey resource nameoldConnObjectKey
- old ConnObjectKeyCopyright © 2010–2023 The Apache Software Foundation. All rights reserved.