2 * Copyright (c) 2019 PANTHEON.tech, s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.mdsal.binding.dom.codec.api;
10 import com.google.common.annotations.Beta;
11 import com.google.common.collect.ImmutableCollection;
12 import org.eclipse.jdt.annotation.NonNull;
13 import org.opendaylight.yangtools.yang.binding.BindingObject;
14 import org.opendaylight.yangtools.yang.binding.DataObject;
17 public interface BindingDataObjectCodecTreeNode<T extends DataObject>
18 extends CommonDataObjectCodecTreeNode<T>, BindingNormalizedNodeCodec<T> {
20 * Returns codec which uses caches serialization / deserialization results.
23 * Caching may introduce performance penalty to serialization / deserialization
24 * but may decrease use of heap for repetitive objects.
26 * @param cacheSpecifier Set of objects, for which cache may be in place
27 * @return Codec which uses cache for serialization / deserialization.
29 @NonNull BindingNormalizedNodeCachingCodec<T> createCachingCodec(
30 @NonNull ImmutableCollection<Class<? extends BindingObject>> cacheSpecifier);