Bump versions to 13.0.4-SNAPSHOT
[mdsal.git] / binding / mdsal-binding-dom-codec-api / src / main / java / org / opendaylight / mdsal / binding / dom / codec / api / BindingDataObjectCodecTreeNode.java
1 /*
2  * Copyright (c) 2019 PANTHEON.tech, s.r.o. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.mdsal.binding.dom.codec.api;
9
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;
15
16 @Beta
17 public interface BindingDataObjectCodecTreeNode<T extends DataObject>
18         extends CommonDataObjectCodecTreeNode<T>, BindingNormalizedNodeCodec<T> {
19     /**
20      * Returns codec which uses caches serialization / deserialization results.
21      *
22      * <p>
23      * Caching may introduce performance penalty to serialization / deserialization
24      * but may decrease use of heap for repetitive objects.
25      *
26      * @param cacheSpecifier Set of objects, for which cache may be in place
27      * @return Codec which uses cache for serialization / deserialization.
28      */
29     @NonNull BindingNormalizedNodeCachingCodec<T> createCachingCodec(
30             @NonNull ImmutableCollection<Class<? extends BindingObject>> cacheSpecifier);
31 }