public interface AclInterfaceCache
Modifier and Type | Method and Description |
---|---|
@NonNull AclInterface |
addOrUpdate(@NonNull String interfaceId,
@NonNull BiConsumer<AclInterface,AclInterface.Builder> updateFunction)
Adds a new AclInterface if not already existing, otherwise updates the existing instance.
|
@NonNull Collection<Map.Entry<String,AclInterface>> |
entries() |
@Nullable AclInterface |
get(@NonNull String interfaceId)
Gets an AclInterface instance from the cache if present.
|
AclInterface |
remove(@NonNull String interfaceId)
Removes an AclInterface instance from the cache.
|
@Nullable AclInterface |
updateIfPresent(@NonNull String interfaceId,
@NonNull 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 © 2020 OpenDaylight. All rights reserved.