public interface AclInterfaceCache
Modifier and Type | Method and Description |
---|---|
AclInterface |
addOrUpdate(String interfaceId,
BiConsumer<AclInterface,AclInterface.Builder> updateFunction)
Adds a new AclInterface if not already existing, otherwise updates the existing instance.
|
Collection<Map.Entry<String,AclInterface>> |
entries() |
AclInterface |
get(String interfaceId)
Gets an AclInterface instance from the cache if present.
|
AclInterface |
remove(String interfaceId)
Removes an AclInterface instance from the cache.
|
AclInterface |
updateIfPresent(String interfaceId,
BiFunction<AclInterface,AclInterface.Builder,Boolean> updateFunction)
Updates an existing AclInterface instance in the cache.
|
@Nonnull AclInterface addOrUpdate(@Nonnull String interfaceId, @Nonnull BiConsumer<AclInterface,AclInterface.Builder> updateFunction)
interfaceId
- the interface IdupdateFunction
- the function used to build a new instance from the provided AclInterface.Builder. If an
instance already exists in the cache, the previous instance is passed to the function and
the Builder is initially populated from the existing instance.@Nullable AclInterface updateIfPresent(@Nonnull String interfaceId, @Nonnull BiFunction<AclInterface,AclInterface.Builder,Boolean> updateFunction)
interfaceId
- the interface IdupdateFunction
- the function used to build a new instance from the provided AclInterface.Builder. The
previous instance is passed to the function and the Builder is initially populated from
the existing instance. The function returns a boolean indicating if any updates were
actually made.AclInterface remove(@Nonnull String interfaceId)
interfaceId
- the interface Id@Nullable AclInterface get(@Nonnull String interfaceId)
interfaceId
- the interface Id@Nonnull Collection<Map.Entry<String,AclInterface>> entries()
Copyright © 2019 OpenDaylight. All rights reserved.