Search in sources :

Example 76 with Object

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.Object in project lispflowmapping by opendaylight.

the class FlatMapCache method addMapping.

@Override
public void addMapping(Eid eid, Object value) {
    Eid key = MaskUtil.normalize(eid);
    dao.put(key, new MappingEntry<>(SubKeys.RECORD, value));
}
Also used : Eid(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.eid.container.Eid)

Example 77 with Object

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.Object in project lispflowmapping by opendaylight.

the class FlatMapCache method addData.

@Override
public void addData(Eid eid, String subKey, Object value) {
    Eid key = MaskUtil.normalize(eid);
    dao.put(key, new MappingEntry<>(subKey, value));
}
Also used : Eid(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.eid.container.Eid)

Example 78 with Object

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.Object in project lispflowmapping by opendaylight.

the class MultiTableMapCache method addMapping.

public void addMapping(Eid key, Object value) {
    Eid eid = MaskUtil.normalize(key);
    ILispDAO table = getOrInstantiateVniTable(key);
    if (eid.getAddress() instanceof SourceDestKey) {
        Eid srcKey = SourceDestKeyHelper.getSrcBinary(eid);
        ILispDAO srcDstDao = getOrInstantiateSDInnerDao(eid, table);
        srcDstDao.put(srcKey, new MappingEntry<>(SubKeys.RECORD, value));
    } else {
        table.put(eid, new MappingEntry<>(SubKeys.RECORD, value));
    }
}
Also used : Eid(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.eid.container.Eid) SourceDestKey(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.SourceDestKey) ILispDAO(org.opendaylight.lispflowmapping.interfaces.dao.ILispDAO)

Example 79 with Object

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.Object in project lispflowmapping by opendaylight.

the class MultiTableMapCache method getData.

@Override
public Object getData(Eid eid, String subKey) {
    Eid key = MaskUtil.normalize(eid);
    ILispDAO table = getVniTable(key);
    if (table == null) {
        return null;
    }
    if (key.getAddress() instanceof SourceDestKey) {
        ILispDAO srcDstDao = getSDInnerDao(key, table);
        return srcDstDao.getSpecific(SourceDestKeyHelper.getSrcBinary(key), subKey);
    } else {
        return table.getSpecific(key, subKey);
    }
}
Also used : Eid(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.eid.container.Eid) SourceDestKey(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.SourceDestKey) ILispDAO(org.opendaylight.lispflowmapping.interfaces.dao.ILispDAO)

Example 80 with Object

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.Object in project lispflowmapping by opendaylight.

the class MultiTableMapCache method getMapping.

public Object getMapping(Eid srcEid, Eid dstEid) {
    if (dstEid == null) {
        return null;
    }
    ILispDAO table = getVniTable(dstEid);
    if (table == null) {
        return null;
    }
    // a map-request for an actual SrcDst LCAF, ignore src eid
    if (dstEid.getAddress() instanceof SourceDestKey) {
        Eid srcAddr = SourceDestKeyHelper.getSrcBinary(dstEid);
        Eid dstAddr = SourceDestKeyHelper.getDstBinary(dstEid);
        return getMappingLpmSD(srcAddr, dstAddr, table);
    }
    // potential map-request for SrcDst LCAF from non SrcDst capable devices
    return getMappingLpmSD(srcEid, dstEid, table);
}
Also used : Eid(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.eid.container.Eid) SourceDestKey(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.SourceDestKey) ILispDAO(org.opendaylight.lispflowmapping.interfaces.dao.ILispDAO)

Aggregations

ArrayList (java.util.ArrayList)94 ByteBuf (io.netty.buffer.ByteBuf)82 Test (org.junit.Test)62 PCEPDeserializerException (org.opendaylight.protocol.pcep.spi.PCEPDeserializerException)34 Object (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.Object)33 RpcResult (org.opendaylight.yangtools.yang.common.RpcResult)33 ExecutionException (java.util.concurrent.ExecutionException)30 Eid (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.eid.container.Eid)29 Uuid (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid)25 Attributes (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.path.attributes.Attributes)25 List (java.util.List)21 HashMap (java.util.HashMap)19 Object (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Object)18 InstanceIdentifier (org.opendaylight.yangtools.yang.binding.InstanceIdentifier)17 Nullable (org.eclipse.jdt.annotation.Nullable)16 UnknownObject (org.opendaylight.protocol.pcep.spi.UnknownObject)16 ListenableFuture (com.google.common.util.concurrent.ListenableFuture)15 Uint32 (org.opendaylight.yangtools.yang.common.Uint32)15 FutureCallback (com.google.common.util.concurrent.FutureCallback)14 BigInteger (java.math.BigInteger)14