InstructionUtils.setFlowBuilderInstruction(flowBuilder, popVlanInstruction);
writeFlow(flowBuilder, nodeBuilder);
} else {
- Set<String> lstMacAddress = new HashSet<String>();
+ Set<String> lstMacAddress = new HashSet<>();
if (vlanProviderCache != null && !vlanProviderCache.isEmpty() &&
vlanProviderCache.containsKey(segmentationId)) {
lstMacAddress = vlanProviderCache.get(segmentationId);
if (write) {
LOG.debug("In programProviderNetworkPushVlan macAddress:" + macAddress
+ "segmentationId:" + segmentationId);
- Set<String> lstMacAddress = new HashSet<String>();
+ Set<String> lstMacAddress;
if (vlanProviderCache != null && !vlanProviderCache.isEmpty() && vlanProviderCache.containsKey(segmentationId)) {
lstMacAddress = vlanProviderCache.get(segmentationId);
} else {
- lstMacAddress = new HashSet<String>();
+ lstMacAddress = new HashSet<>();
vlanProviderCache.put(segmentationId, lstMacAddress);
}
lstMacAddress.add(macAddress);
return;
}
this.isCachePopulationDone = true;
- Set<String> lstMacAddress = new HashSet<String>();
+ Set<String> lstMacAddress;
List<NeutronPort> neutronPorts = neutronPortCache.getAllPorts();
for (NeutronPort neutronPort : neutronPorts) {
if (neutronPort != null && neutronPort.getDeviceOwner().equalsIgnoreCase(Constants.OWNER_ROUTER_GATEWAY)) {
vlanProviderCache.containsKey(providerSegmentationId)) {
lstMacAddress = vlanProviderCache.get(providerSegmentationId);
} else {
- lstMacAddress = new HashSet<String>();
+ lstMacAddress = new HashSet<>();
vlanProviderCache.put(providerSegmentationId, lstMacAddress);
}
lstMacAddress.add(macAddress);
public static final int IP_PROT_UDP = 17;
public static final String LEARN_PRIORITY = "61010";
public static final String DELETE_LEARNED_FLAG_VALUE = "2";
- public static final HashMap<Integer, String> ICMP_TYPE_MAP = new HashMap<Integer, String>();
+ public static final HashMap<Integer, String> ICMP_TYPE_MAP = new HashMap<>();
static
{
ICMP_TYPE_MAP.put(8, "0");
List<OvsdbTerminationPointAugmentation> tpAugmentations = new ArrayList<>();
if (node == null) {
LOG.error("extractTerminationPointAugmentations: Node value is null");
- return Collections.<OvsdbTerminationPointAugmentation>emptyList();
+ return Collections.emptyList();
}
List<TerminationPoint> terminationPoints = node.getTerminationPoint();
if(terminationPoints != null && !terminationPoints.isEmpty()){
public List<OvsdbTerminationPointAugmentation> readTerminationPointAugmentations(Node node) {
if (node == null) {
LOG.error("readTerminationPointAugmentations: Node value is null");
- return Collections.<OvsdbTerminationPointAugmentation>emptyList();
+ return Collections.emptyList();
}
InstanceIdentifier<Node> bridgeNodeIid = MdsalHelper.createInstanceIdentifier(node.getNodeId());
Node operNode = mdsalUtils.read(LogicalDatastoreType.OPERATIONAL, bridgeNodeIid);
assertEquals("Error, canCreateNeutronLoadBalancerPoolMember() didn't return the correct HTTP flag", HttpURLConnection.HTTP_OK, lBaaSPoolMemberHandler.canCreateNeutronLoadBalancerPoolMember(neutronLBMember));
// HTTP_NOT_ACCEPTABLE
- when(neutronNetworkCache.getAllNetworks()).thenReturn(Collections.<NeutronNetwork>emptyList());
+ when(neutronNetworkCache.getAllNetworks()).thenReturn(Collections.emptyList());
assertEquals("Error, canCreateNeutronLoadBalancerPoolMember() didn't return the correct HTTP flag", HttpURLConnection.HTTP_NOT_ACCEPTABLE, lBaaSPoolMemberHandler.canCreateNeutronLoadBalancerPoolMember(neutronLBMember));
}
assertEquals("Error, canDeleteNeutronLoadBalancerPoolMember() didn't return the correct HTTP flag", HttpURLConnection.HTTP_OK, lBaaSPoolMemberHandler.canDeleteNeutronLoadBalancerPoolMember(neutronLBMember));
// HTTP_NOT_ACCEPTABLE
- when(neutronNetworkCache.getAllNetworks()).thenReturn(Collections.<NeutronNetwork>emptyList());
+ when(neutronNetworkCache.getAllNetworks()).thenReturn(Collections.emptyList());
assertEquals("Error, canDeleteNeutronLoadBalancerPoolMember() didn't return the correct HTTP flag", HttpURLConnection.HTTP_NOT_ACCEPTABLE, lBaaSPoolMemberHandler.canDeleteNeutronLoadBalancerPoolMember(neutronLBMember));
}
public class MethodInvocationParamSaver<T> implements Answer<T> {
- private List<List<Object>> invocationParams = new ArrayList<List<Object>>();
+ private List<List<Object>> invocationParams = new ArrayList<>();
private T answer;
public MethodInvocationParamSaver(T answer) {
Notification n;
String alarmAddText, alarmSrc = "BGP";
BgpAlarmErrorCodes userAlarm;
- ArrayList<String> arrayList = new ArrayList<String>();
+ ArrayList<String> arrayList = new ArrayList<>();
userAlarm = BgpAlarmErrorCodes.checkErrorSubcode(subcode);
alarmAddText = "Peer=" + pfx;
this.alarmType = alarmType;
}
- private static final Map<Integer, BgpAlarmErrorCodes> intToTypeMap = new HashMap<Integer, BgpAlarmErrorCodes>();
+ private static final Map<Integer, BgpAlarmErrorCodes> intToTypeMap = new HashMap<>();
static {
for (BgpAlarmErrorCodes type : BgpAlarmErrorCodes.values()) {
intToTypeMap.put(type.error, type);
private static final Logger LOGGER = LoggerFactory.getLogger(BgpCounters.class);
public static BgpCountersBroadcaster bgpStatsBroadcaster = null;
public MBeanServer bgpStatsServer = null;
- public Map <String, String> countersMap = new HashMap<String, String>();
+ public Map <String, String> countersMap = new HashMap<>();
private String bgpSdncMip = "127.0.0.1";
public BgpCounters(String mipAddress) {
File file = new File("cmd_ip_bgp_summary.txt");
Scanner scanner;
String lineFromFile;
- List<String> inputStrs = new ArrayList<String>();
+ List<String> inputStrs = new ArrayList<>();
int i = 0;
String as,rx, tx;
boolean startEntries = false;
String lineFromFile;
StringBuilder key = new StringBuilder();
String totPfx = "";
- List<String> inputStrs = new ArrayList<String>();
+ List<String> inputStrs = new ArrayList<>();
try {
scanner = new Scanner(file);
} catch (IOException e) {
File file = new File("cmd_ip_bgp_vpnv4_all.txt");
Scanner scanner;
String lineFromFile;
- List<String> inputStrs = new ArrayList<String>();
+ List<String> inputStrs = new ArrayList<>();
try {
scanner = new Scanner(file);
File file = new File("cmd_ip_bgp_vpnv4_all_summary.txt");
Scanner scanner;
String lineFromFile;
- List<String> inputStrs = new ArrayList<String>();
+ List<String> inputStrs = new ArrayList<>();
int i = 0;
boolean startEntries = false;
String[] result;
* Created by ECHIAPT on 9/25/2015.
*/
public class BgpCountersBroadcaster extends NotificationBroadcasterSupport implements BgpCountersBroadcasterMBean {
- public Map<String, String> bgpCountersMap = new HashMap<String, String>();
+ public Map<String, String> bgpCountersMap = new HashMap<>();
private static final Logger LOGGER = LoggerFactory.getLogger(BgpCountersBroadcaster.class);
public Map<String, String> retrieveCounterMap() {
LOGGER.trace("Polled retrieveCounterMap");
- Map<String, String> countersVal = new HashMap<String, String>(bgpCountersMap);
+ Map<String, String> countersVal = new HashMap<>(bgpCountersMap);
Iterator<Map.Entry<String, String>> entries = countersVal.entrySet().iterator();
while (entries.hasNext()) {
Map.Entry<String, String> entry = entries.next();
public class BgpNbrControlPathAlarm extends NotificationBroadcasterSupport implements BgpNbrControlPathAlarmMBean {
- ArrayList<String> raiseAlarmObject = new ArrayList<String>();
- ArrayList<String> clearAlarmObject = new ArrayList<String>();
+ ArrayList<String> raiseAlarmObject = new ArrayList<>();
+ ArrayList<String> clearAlarmObject = new ArrayList<>();
private long sequenceNumber = 1;
public void setRaiseAlarmObject(ArrayList<String> raiseAlarmObject) {
public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
public Processor(I iface) {
- super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
+ super(iface, getProcessMap(new HashMap<>()));
}
protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
public AsyncProcessor(I iface) {
- super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
+ super(iface, getProcessMap(new HashMap<>()));
}
protected AsyncProcessor(I iface, Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
private static final org.apache.thrift.protocol.TField STALEPATH_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("stalepathTime", org.apache.thrift.protocol.TType.I32, (short)6);
private static final org.apache.thrift.protocol.TField ANNOUNCE_FLUSH_FIELD_DESC = new org.apache.thrift.protocol.TField("announceFlush", org.apache.thrift.protocol.TType.BOOL, (short)7);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
static {
schemes.put(StandardScheme.class, new startBgp_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new startBgp_argsTupleSchemeFactory());
STALEPATH_TIME((short)6, "stalepathTime"),
ANNOUNCE_FLUSH((short)7, "announceFlush");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final Map<String, _Fields> byName = new HashMap<>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<>(_Fields.class);
tmpMap.put(_Fields.AS_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("asNumber", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.ROUTER_ID, new org.apache.thrift.meta_data.FieldMetaData("routerId", org.apache.thrift.TFieldRequirementType.DEFAULT,
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
static {
schemes.put(StandardScheme.class, new startBgp_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new startBgp_resultTupleSchemeFactory());
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final Map<String, _Fields> byName = new HashMap<>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
private static final org.apache.thrift.protocol.TField AS_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("asNumber", org.apache.thrift.protocol.TType.I64, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
static {
schemes.put(StandardScheme.class, new stopBgp_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new stopBgp_argsTupleSchemeFactory());
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
AS_NUMBER((short)1, "asNumber");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final Map<String, _Fields> byName = new HashMap<>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<>(_Fields.class);
tmpMap.put(_Fields.AS_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("asNumber", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
static {
schemes.put(StandardScheme.class, new stopBgp_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new stopBgp_resultTupleSchemeFactory());
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final Map<String, _Fields> byName = new HashMap<>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
private static final org.apache.thrift.protocol.TField IP_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("ipAddress", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField AS_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("asNumber", org.apache.thrift.protocol.TType.I64, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
static {
schemes.put(StandardScheme.class, new createPeer_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new createPeer_argsTupleSchemeFactory());
IP_ADDRESS((short)1, "ipAddress"),
AS_NUMBER((short)2, "asNumber");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final Map<String, _Fields> byName = new HashMap<>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<>(_Fields.class);
tmpMap.put(_Fields.IP_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("ipAddress", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.AS_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("asNumber", org.apache.thrift.TFieldRequirementType.DEFAULT,
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
static {
schemes.put(StandardScheme.class, new createPeer_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new createPeer_resultTupleSchemeFactory());
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final Map<String, _Fields> byName = new HashMap<>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
private static final org.apache.thrift.protocol.TField IP_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("ipAddress", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
static {
schemes.put(StandardScheme.class, new deletePeer_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new deletePeer_argsTupleSchemeFactory());
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
IP_ADDRESS((short)1, "ipAddress");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final Map<String, _Fields> byName = new HashMap<>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<>(_Fields.class);
tmpMap.put(_Fields.IP_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("ipAddress", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
static {
schemes.put(StandardScheme.class, new deletePeer_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new deletePeer_resultTupleSchemeFactory());
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final Map<String, _Fields> byName = new HashMap<>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
private static final org.apache.thrift.protocol.TField IRTS_FIELD_DESC = new org.apache.thrift.protocol.TField("irts", org.apache.thrift.protocol.TType.LIST, (short)2);
private static final org.apache.thrift.protocol.TField ERTS_FIELD_DESC = new org.apache.thrift.protocol.TField("erts", org.apache.thrift.protocol.TType.LIST, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
static {
schemes.put(StandardScheme.class, new addVrf_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new addVrf_argsTupleSchemeFactory());
IRTS((short)2, "irts"),
ERTS((short)3, "erts");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final Map<String, _Fields> byName = new HashMap<>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<>(_Fields.class);
tmpMap.put(_Fields.RD, new org.apache.thrift.meta_data.FieldMetaData("rd", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.IRTS, new org.apache.thrift.meta_data.FieldMetaData("irts", org.apache.thrift.TFieldRequirementType.DEFAULT,
this.rd = other.rd;
}
if (other.isSetIrts()) {
- List<String> __this__irts = new ArrayList<String>(other.irts);
+ List<String> __this__irts = new ArrayList<>(other.irts);
this.irts = __this__irts;
}
if (other.isSetErts()) {
- List<String> __this__erts = new ArrayList<String>(other.erts);
+ List<String> __this__erts = new ArrayList<>(other.erts);
this.erts = __this__erts;
}
}
public void addToIrts(String elem) {
if (this.irts == null) {
- this.irts = new ArrayList<String>();
+ this.irts = new ArrayList<>();
}
this.irts.add(elem);
}
public void addToErts(String elem) {
if (this.erts == null) {
- this.erts = new ArrayList<String>();
+ this.erts = new ArrayList<>();
}
this.erts.add(elem);
}
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
- struct.irts = new ArrayList<String>(_list8.size);
+ struct.irts = new ArrayList<>(_list8.size);
for (int _i9 = 0; _i9 < _list8.size; ++_i9)
{
String _elem10;
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list11 = iprot.readListBegin();
- struct.erts = new ArrayList<String>(_list11.size);
+ struct.erts = new ArrayList<>(_list11.size);
for (int _i12 = 0; _i12 < _list11.size; ++_i12)
{
String _elem13;
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TList _list18 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.irts = new ArrayList<String>(_list18.size);
+ struct.irts = new ArrayList<>(_list18.size);
for (int _i19 = 0; _i19 < _list18.size; ++_i19)
{
String _elem20;
if (incoming.get(2)) {
{
org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.erts = new ArrayList<String>(_list21.size);
+ struct.erts = new ArrayList<>(_list21.size);
for (int _i22 = 0; _i22 < _list21.size; ++_i22)
{
String _elem23;
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
static {
schemes.put(StandardScheme.class, new addVrf_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new addVrf_resultTupleSchemeFactory());
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final Map<String, _Fields> byName = new HashMap<>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
private static final org.apache.thrift.protocol.TField RD_FIELD_DESC = new org.apache.thrift.protocol.TField("rd", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
static {
schemes.put(StandardScheme.class, new delVrf_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new delVrf_argsTupleSchemeFactory());
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
RD((short)1, "rd");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final Map<String, _Fields> byName = new HashMap<>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<>(_Fields.class);
tmpMap.put(_Fields.RD, new org.apache.thrift.meta_data.FieldMetaData("rd", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
static {
schemes.put(StandardScheme.class, new delVrf_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new delVrf_resultTupleSchemeFactory());
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final Map<String, _Fields> byName = new HashMap<>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
private static final org.apache.thrift.protocol.TField RD_FIELD_DESC = new org.apache.thrift.protocol.TField("rd", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField LABEL_FIELD_DESC = new org.apache.thrift.protocol.TField("label", org.apache.thrift.protocol.TType.I32, (short)4);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
static {
schemes.put(StandardScheme.class, new pushRoute_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new pushRoute_argsTupleSchemeFactory());
RD((short)3, "rd"),
LABEL((short)4, "label");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final Map<String, _Fields> byName = new HashMap<>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<>(_Fields.class);
tmpMap.put(_Fields.PREFIX, new org.apache.thrift.meta_data.FieldMetaData("prefix", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.NEXTHOP, new org.apache.thrift.meta_data.FieldMetaData("nexthop", org.apache.thrift.TFieldRequirementType.DEFAULT,
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
static {
schemes.put(StandardScheme.class, new pushRoute_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new pushRoute_resultTupleSchemeFactory());
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final Map<String, _Fields> byName = new HashMap<>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
private static final org.apache.thrift.protocol.TField PREFIX_FIELD_DESC = new org.apache.thrift.protocol.TField("prefix", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField RD_FIELD_DESC = new org.apache.thrift.protocol.TField("rd", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
static {
schemes.put(StandardScheme.class, new withdrawRoute_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new withdrawRoute_argsTupleSchemeFactory());
PREFIX((short)1, "prefix"),
RD((short)2, "rd");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final Map<String, _Fields> byName = new HashMap<>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<>(_Fields.class);
tmpMap.put(_Fields.PREFIX, new org.apache.thrift.meta_data.FieldMetaData("prefix", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.RD, new org.apache.thrift.meta_data.FieldMetaData("rd", org.apache.thrift.TFieldRequirementType.DEFAULT,
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
static {
schemes.put(StandardScheme.class, new withdrawRoute_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new withdrawRoute_resultTupleSchemeFactory());
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final Map<String, _Fields> byName = new HashMap<>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
private static final org.apache.thrift.protocol.TField PEER_IP_FIELD_DESC = new org.apache.thrift.protocol.TField("peerIp", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField N_HOPS_FIELD_DESC = new org.apache.thrift.protocol.TField("nHops", org.apache.thrift.protocol.TType.I32, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
static {
schemes.put(StandardScheme.class, new setEbgpMultihop_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new setEbgpMultihop_argsTupleSchemeFactory());
PEER_IP((short)1, "peerIp"),
N_HOPS((short)2, "nHops");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final Map<String, _Fields> byName = new HashMap<>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<>(_Fields.class);
tmpMap.put(_Fields.PEER_IP, new org.apache.thrift.meta_data.FieldMetaData("peerIp", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.N_HOPS, new org.apache.thrift.meta_data.FieldMetaData("nHops", org.apache.thrift.TFieldRequirementType.DEFAULT,
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
static {
schemes.put(StandardScheme.class, new setEbgpMultihop_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new setEbgpMultihop_resultTupleSchemeFactory());
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final Map<String, _Fields> byName = new HashMap<>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
private static final org.apache.thrift.protocol.TField PEER_IP_FIELD_DESC = new org.apache.thrift.protocol.TField("peerIp", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
static {
schemes.put(StandardScheme.class, new unsetEbgpMultihop_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new unsetEbgpMultihop_argsTupleSchemeFactory());
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
PEER_IP((short)1, "peerIp");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final Map<String, _Fields> byName = new HashMap<>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<>(_Fields.class);
tmpMap.put(_Fields.PEER_IP, new org.apache.thrift.meta_data.FieldMetaData("peerIp", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
static {
schemes.put(StandardScheme.class, new unsetEbgpMultihop_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new unsetEbgpMultihop_resultTupleSchemeFactory());
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final Map<String, _Fields> byName = new HashMap<>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
private static final org.apache.thrift.protocol.TField PEER_IP_FIELD_DESC = new org.apache.thrift.protocol.TField("peerIp", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField SRC_IP_FIELD_DESC = new org.apache.thrift.protocol.TField("srcIp", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
static {
schemes.put(StandardScheme.class, new setUpdateSource_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new setUpdateSource_argsTupleSchemeFactory());
PEER_IP((short)1, "peerIp"),
SRC_IP((short)2, "srcIp");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final Map<String, _Fields> byName = new HashMap<>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<>(_Fields.class);
tmpMap.put(_Fields.PEER_IP, new org.apache.thrift.meta_data.FieldMetaData("peerIp", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.SRC_IP, new org.apache.thrift.meta_data.FieldMetaData("srcIp", org.apache.thrift.TFieldRequirementType.DEFAULT,
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
static {
schemes.put(StandardScheme.class, new setUpdateSource_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new setUpdateSource_resultTupleSchemeFactory());
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final Map<String, _Fields> byName = new HashMap<>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
private static final org.apache.thrift.protocol.TField PEER_IP_FIELD_DESC = new org.apache.thrift.protocol.TField("peerIp", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
static {
schemes.put(StandardScheme.class, new unsetUpdateSource_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new unsetUpdateSource_argsTupleSchemeFactory());
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
PEER_IP((short)1, "peerIp");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final Map<String, _Fields> byName = new HashMap<>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<>(_Fields.class);
tmpMap.put(_Fields.PEER_IP, new org.apache.thrift.meta_data.FieldMetaData("peerIp", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
static {
schemes.put(StandardScheme.class, new unsetUpdateSource_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new unsetUpdateSource_resultTupleSchemeFactory());
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final Map<String, _Fields> byName = new HashMap<>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
private static final org.apache.thrift.protocol.TField AFI_FIELD_DESC = new org.apache.thrift.protocol.TField("afi", org.apache.thrift.protocol.TType.I32, (short)2);
private static final org.apache.thrift.protocol.TField SAFI_FIELD_DESC = new org.apache.thrift.protocol.TField("safi", org.apache.thrift.protocol.TType.I32, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
static {
schemes.put(StandardScheme.class, new enableAddressFamily_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new enableAddressFamily_argsTupleSchemeFactory());
*/
SAFI((short)3, "safi");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final Map<String, _Fields> byName = new HashMap<>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<>(_Fields.class);
tmpMap.put(_Fields.PEER_IP, new org.apache.thrift.meta_data.FieldMetaData("peerIp", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.AFI, new org.apache.thrift.meta_data.FieldMetaData("afi", org.apache.thrift.TFieldRequirementType.DEFAULT,
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
static {
schemes.put(StandardScheme.class, new enableAddressFamily_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new enableAddressFamily_resultTupleSchemeFactory());
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final Map<String, _Fields> byName = new HashMap<>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
private static final org.apache.thrift.protocol.TField AFI_FIELD_DESC = new org.apache.thrift.protocol.TField("afi", org.apache.thrift.protocol.TType.I32, (short)2);
private static final org.apache.thrift.protocol.TField SAFI_FIELD_DESC = new org.apache.thrift.protocol.TField("safi", org.apache.thrift.protocol.TType.I32, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
static {
schemes.put(StandardScheme.class, new disableAddressFamily_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new disableAddressFamily_argsTupleSchemeFactory());
*/
SAFI((short)3, "safi");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final Map<String, _Fields> byName = new HashMap<>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<>(_Fields.class);
tmpMap.put(_Fields.PEER_IP, new org.apache.thrift.meta_data.FieldMetaData("peerIp", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.AFI, new org.apache.thrift.meta_data.FieldMetaData("afi", org.apache.thrift.TFieldRequirementType.DEFAULT,
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
static {
schemes.put(StandardScheme.class, new disableAddressFamily_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new disableAddressFamily_resultTupleSchemeFactory());
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final Map<String, _Fields> byName = new HashMap<>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
private static final org.apache.thrift.protocol.TField LOG_FILE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("logFileName", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField LOG_LEVEL_FIELD_DESC = new org.apache.thrift.protocol.TField("logLevel", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
static {
schemes.put(StandardScheme.class, new setLogConfig_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new setLogConfig_argsTupleSchemeFactory());
LOG_FILE_NAME((short)1, "logFileName"),
LOG_LEVEL((short)2, "logLevel");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final Map<String, _Fields> byName = new HashMap<>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<>(_Fields.class);
tmpMap.put(_Fields.LOG_FILE_NAME, new org.apache.thrift.meta_data.FieldMetaData("logFileName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.LOG_LEVEL, new org.apache.thrift.meta_data.FieldMetaData("logLevel", org.apache.thrift.TFieldRequirementType.DEFAULT,
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
static {
schemes.put(StandardScheme.class, new setLogConfig_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new setLogConfig_resultTupleSchemeFactory());
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final Map<String, _Fields> byName = new HashMap<>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
private static final org.apache.thrift.protocol.TField STALEPATH_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("stalepathTime", org.apache.thrift.protocol.TType.I32, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
static {
schemes.put(StandardScheme.class, new enableGracefulRestart_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new enableGracefulRestart_argsTupleSchemeFactory());
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
STALEPATH_TIME((short)1, "stalepathTime");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final Map<String, _Fields> byName = new HashMap<>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<>(_Fields.class);
tmpMap.put(_Fields.STALEPATH_TIME, new org.apache.thrift.meta_data.FieldMetaData("stalepathTime", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
static {
schemes.put(StandardScheme.class, new enableGracefulRestart_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new enableGracefulRestart_resultTupleSchemeFactory());
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final Map<String, _Fields> byName = new HashMap<>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("disableGracefulRestart_args");
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
static {
schemes.put(StandardScheme.class, new disableGracefulRestart_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new disableGracefulRestart_argsTupleSchemeFactory());
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final Map<String, _Fields> byName = new HashMap<>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
}
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<>(_Fields.class);
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(disableGracefulRestart_args.class, metaDataMap);
}
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
static {
schemes.put(StandardScheme.class, new disableGracefulRestart_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new disableGracefulRestart_resultTupleSchemeFactory());
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final Map<String, _Fields> byName = new HashMap<>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
private static final org.apache.thrift.protocol.TField OPTYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("optype", org.apache.thrift.protocol.TType.I32, (short)1);
private static final org.apache.thrift.protocol.TField WIN_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("winSize", org.apache.thrift.protocol.TType.I32, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
static {
schemes.put(StandardScheme.class, new getRoutes_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new getRoutes_argsTupleSchemeFactory());
OPTYPE((short)1, "optype"),
WIN_SIZE((short)2, "winSize");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final Map<String, _Fields> byName = new HashMap<>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<>(_Fields.class);
tmpMap.put(_Fields.OPTYPE, new org.apache.thrift.meta_data.FieldMetaData("optype", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.WIN_SIZE, new org.apache.thrift.meta_data.FieldMetaData("winSize", org.apache.thrift.TFieldRequirementType.DEFAULT,
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
static {
schemes.put(StandardScheme.class, new getRoutes_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new getRoutes_resultTupleSchemeFactory());
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final Map<String, _Fields> byName = new HashMap<>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Routes.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
public Processor(I iface) {
- super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
+ super(iface, getProcessMap(new HashMap<>()));
}
protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
public AsyncProcessor(I iface) {
- super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
+ super(iface, getProcessMap(new HashMap<>()));
}
protected AsyncProcessor(I iface, Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
private static final org.apache.thrift.protocol.TField NEXTHOP_FIELD_DESC = new org.apache.thrift.protocol.TField("nexthop", org.apache.thrift.protocol.TType.STRING, (short)4);
private static final org.apache.thrift.protocol.TField LABEL_FIELD_DESC = new org.apache.thrift.protocol.TField("label", org.apache.thrift.protocol.TType.I32, (short)5);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
static {
schemes.put(StandardScheme.class, new onUpdatePushRoute_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new onUpdatePushRoute_argsTupleSchemeFactory());
NEXTHOP((short)4, "nexthop"),
LABEL((short)5, "label");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final Map<String, _Fields> byName = new HashMap<>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<>(_Fields.class);
tmpMap.put(_Fields.RD, new org.apache.thrift.meta_data.FieldMetaData("rd", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.PREFIX, new org.apache.thrift.meta_data.FieldMetaData("prefix", org.apache.thrift.TFieldRequirementType.DEFAULT,
private static final org.apache.thrift.protocol.TField PREFIXLEN_FIELD_DESC = new org.apache.thrift.protocol.TField("prefixlen", org.apache.thrift.protocol.TType.I32, (short)3);
private static final org.apache.thrift.protocol.TField NEXTHOP_FIELD_DESC = new org.apache.thrift.protocol.TField("nexthop", org.apache.thrift.protocol.TType.STRING, (short)4);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
static {
schemes.put(StandardScheme.class, new onUpdateWithdrawRoute_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new onUpdateWithdrawRoute_argsTupleSchemeFactory());
PREFIXLEN((short)3, "prefixlen"),
NEXTHOP((short)4, "nexthop");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final Map<String, _Fields> byName = new HashMap<>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<>(_Fields.class);
tmpMap.put(_Fields.RD, new org.apache.thrift.meta_data.FieldMetaData("rd", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.PREFIX, new org.apache.thrift.meta_data.FieldMetaData("prefix", org.apache.thrift.TFieldRequirementType.DEFAULT,
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("onStartConfigResyncNotification_args");
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
static {
schemes.put(StandardScheme.class, new onStartConfigResyncNotification_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new onStartConfigResyncNotification_argsTupleSchemeFactory());
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final Map<String, _Fields> byName = new HashMap<>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
}
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<>(_Fields.class);
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(onStartConfigResyncNotification_args.class, metaDataMap);
}
private static final org.apache.thrift.protocol.TField ERR_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("errCode", org.apache.thrift.protocol.TType.BYTE, (short)2);
private static final org.apache.thrift.protocol.TField ERR_SUBCODE_FIELD_DESC = new org.apache.thrift.protocol.TField("errSubcode", org.apache.thrift.protocol.TType.BYTE, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
static {
schemes.put(StandardScheme.class, new onNotificationSendEvent_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new onNotificationSendEvent_argsTupleSchemeFactory());
ERR_CODE((short)2, "errCode"),
ERR_SUBCODE((short)3, "errSubcode");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final Map<String, _Fields> byName = new HashMap<>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<>(_Fields.class);
tmpMap.put(_Fields.PREFIX, new org.apache.thrift.meta_data.FieldMetaData("prefix", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.ERR_CODE, new org.apache.thrift.meta_data.FieldMetaData("errCode", org.apache.thrift.TFieldRequirementType.DEFAULT,
private static final org.apache.thrift.protocol.TField UPDATES_FIELD_DESC = new org.apache.thrift.protocol.TField("updates", org.apache.thrift.protocol.TType.LIST, (short)2);
private static final org.apache.thrift.protocol.TField MORE_FIELD_DESC = new org.apache.thrift.protocol.TField("more", org.apache.thrift.protocol.TType.I32, (short)4);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
static {
schemes.put(StandardScheme.class, new RoutesStandardSchemeFactory());
schemes.put(TupleScheme.class, new RoutesTupleSchemeFactory());
UPDATES((short)2, "updates"),
MORE((short)4, "more");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final Map<String, _Fields> byName = new HashMap<>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
private _Fields optionals[] = {_Fields.UPDATES,_Fields.MORE};
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<>(_Fields.class);
tmpMap.put(_Fields.ERRCODE, new org.apache.thrift.meta_data.FieldMetaData("errcode", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.UPDATES, new org.apache.thrift.meta_data.FieldMetaData("updates", org.apache.thrift.TFieldRequirementType.OPTIONAL,
__isset_bitfield = other.__isset_bitfield;
this.errcode = other.errcode;
if (other.isSetUpdates()) {
- List<Update> __this__updates = new ArrayList<Update>(other.updates.size());
+ List<Update> __this__updates = new ArrayList<>(other.updates.size());
for (Update other_element : other.updates) {
__this__updates.add(new Update(other_element));
}
public void addToUpdates(Update elem) {
if (this.updates == null) {
- this.updates = new ArrayList<Update>();
+ this.updates = new ArrayList<>();
}
this.updates.add(elem);
}
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
- struct.updates = new ArrayList<Update>(_list0.size);
+ struct.updates = new ArrayList<>(_list0.size);
for (int _i1 = 0; _i1 < _list0.size; ++_i1)
{
Update _elem2;
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.updates = new ArrayList<Update>(_list5.size);
+ struct.updates = new ArrayList<>(_list5.size);
for (int _i6 = 0; _i6 < _list5.size; ++_i6)
{
Update _elem7;
private static final org.apache.thrift.protocol.TField PREFIX_FIELD_DESC = new org.apache.thrift.protocol.TField("prefix", org.apache.thrift.protocol.TType.STRING, (short)6);
private static final org.apache.thrift.protocol.TField NEXTHOP_FIELD_DESC = new org.apache.thrift.protocol.TField("nexthop", org.apache.thrift.protocol.TType.STRING, (short)7);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
static {
schemes.put(StandardScheme.class, new UpdateStandardSchemeFactory());
schemes.put(TupleScheme.class, new UpdateTupleSchemeFactory());
PREFIX((short)6, "prefix"),
NEXTHOP((short)7, "nexthop");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final Map<String, _Fields> byName = new HashMap<>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<>(_Fields.class);
tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.RESERVED, new org.apache.thrift.meta_data.FieldMetaData("reserved", org.apache.thrift.TFieldRequirementType.DEFAULT,
}
public void updateExistingVMTunnelIPCache(IpAddress tunnelIp, String elanInstanceName, String vmMacAddress) {
- Pair<IpAddress, String> tunnelIpElanName = new ImmutablePair<IpAddress, String>(tunnelIp, elanInstanceName);
+ Pair<IpAddress, String> tunnelIpElanName = new ImmutablePair<>(tunnelIp, elanInstanceName);
Set<String> listExistingVmMacAddress;
listExistingVmMacAddress = availableVMCache.get(tunnelIpElanName);
if (listExistingVmMacAddress == null) {
return;
}
IpAddress tunnelIp = device.getTunnelIp();
- Pair<IpAddress, String> tunnelIpElanName = new ImmutablePair<IpAddress, String>(tunnelIp, elanInstanceName);
+ Pair<IpAddress, String> tunnelIpElanName = new ImmutablePair<>(tunnelIp, elanInstanceName);
dhcpExternalTunnelManager.removeFromAvailableCache(tunnelIpElanName);
}
// update the elan-Instance with new properties
WriteTransaction tx = broker.newWriteOnlyTransaction();
ElanUtils.updateOperationalDataStore(broker, idManager,
- update, new ArrayList<String>(), tx);
+ update, new ArrayList<>(), tx);
ElanUtils.waitForTransactionToComplete(tx);
return;
}
if (elanInfo == null) {
WriteTransaction tx = broker.newWriteOnlyTransaction();
ElanUtils.updateOperationalDataStore(broker, idManager,
- elanInstanceAdded, new ArrayList<String>(), tx);
+ elanInstanceAdded, new ArrayList<>(), tx);
ElanUtils.waitForTransactionToComplete(tx);
}
}
return;
}
nodeConnectedHandler.handleNodeConnected(connectedNode, connectedNodePath, haNodePath,
- Optional.<Node>absent(), Optional.<Node>absent(), tx);
+ Optional.absent(), Optional.absent(), tx);
}
@Override
l2gwDeviceNodeId, l2GwConnId);
}
elanL2GwDevice.addL2GatewayId(l2GwConnId);
- if (elanL2GwDevice.getL2gwConnectionIdToDevices().get(l2GwConnId) == null) {
- elanL2GwDevice.getL2gwConnectionIdToDevices().put(l2GwConnId, new ArrayList<Devices>());
- }
- elanL2GwDevice.getL2gwConnectionIdToDevices().get(l2GwConnId).add(l2Device);
+ elanL2GwDevice.getL2gwConnectionIdToDevices().computeIfAbsent(l2GwConnId, key -> new ArrayList<>()).add(
+ l2Device);
LOG.trace("Elan L2GwConn cache updated with below details: {}", elanL2GwDevice);
return elanL2GwDevice;
String flowId = getKnownDynamicmacFlowRef(NwConstants.ELAN_DMAC_TABLE, dpId, dstMacAddress, elanTag);
FlowEntity flow = MDSALUtil.buildFlowEntity(dpId, NwConstants.ELAN_DMAC_TABLE, flowId, 20, displayName, 0, 0,
ElanConstants.COOKIE_ELAN_KNOWN_DMAC.add(BigInteger.valueOf(elanTag)),
- matches, new ArrayList<InstructionInfo>());
+ matches, new ArrayList<>());
return flow;
}
HwvtepGlobalAugmentation haAug = dst.getAugmentation(HwvtepGlobalAugmentation.class);
List<LogicalSwitches> d1Values =
- d1Aug.getLogicalSwitches() != null ? d1Aug.getLogicalSwitches() : new ArrayList<LogicalSwitches>();
+ d1Aug.getLogicalSwitches() != null ? d1Aug.getLogicalSwitches() : new ArrayList<>();
List<LogicalSwitches> result1 = cmd.transform(nodePath, d1Values);
List<LogicalSwitches> result2 = cmd.transform(nodePath, haAug.getLogicalSwitches());
HwvtepGlobalAugmentation haAug = ha.getAugmentation(HwvtepGlobalAugmentation.class);
List<LogicalSwitches> d1Values =
- d1Aug.getLogicalSwitches() != null ? d1Aug.getLogicalSwitches() : new ArrayList<LogicalSwitches>();
+ d1Aug.getLogicalSwitches() != null ? d1Aug.getLogicalSwitches() : new ArrayList<>();
List<LogicalSwitches> result1 = cmd.transform(nodePath, d1Values);
List<LogicalSwitches> d2Values =
- d2Aug.getLogicalSwitches() != null ? d2Aug.getLogicalSwitches() : new ArrayList<LogicalSwitches>();
+ d2Aug.getLogicalSwitches() != null ? d2Aug.getLogicalSwitches() : new ArrayList<>();
List<LogicalSwitches> result2 = cmd.transform(nodePath, d2Values);
//Merge data of both d1 and d2 logical switch info should be same as ha
Set<LogicalSwitches> set1 = new HashSet<>();
HwvtepGlobalAugmentation d1Aug = src.getAugmentation(HwvtepGlobalAugmentation.class);
HwvtepGlobalAugmentation haAug = dst.getAugmentation(HwvtepGlobalAugmentation.class);
List<RemoteUcastMacs> d1Values =
- d1Aug.getRemoteUcastMacs() != null ? d1Aug.getRemoteUcastMacs() : new ArrayList<RemoteUcastMacs>();
+ d1Aug.getRemoteUcastMacs() != null ? d1Aug.getRemoteUcastMacs() : new ArrayList<>();
List<RemoteUcastMacs> result1 = cmd.transform(nodePath, d1Values);
List<RemoteUcastMacs> result2 = cmd.transform(nodePath, haAug.getRemoteUcastMacs());
HwvtepGlobalAugmentation haAug = ha.getAugmentation(HwvtepGlobalAugmentation.class);
List<RemoteUcastMacs> d1Values =
- d1Aug.getRemoteUcastMacs() != null ? d1Aug.getRemoteUcastMacs() : new ArrayList<RemoteUcastMacs>();
+ d1Aug.getRemoteUcastMacs() != null ? d1Aug.getRemoteUcastMacs() : new ArrayList<>();
List<RemoteUcastMacs> result1 = cmd.transform(nodePath, d1Values);
List<RemoteUcastMacs> d2Values =
- d2Aug.getRemoteUcastMacs() != null ? d2Aug.getRemoteUcastMacs() : new ArrayList<RemoteUcastMacs>();
+ d2Aug.getRemoteUcastMacs() != null ? d2Aug.getRemoteUcastMacs() : new ArrayList<>();
List<RemoteUcastMacs> result2 = cmd.transform(nodePath, d2Values);
- List<RemoteUcastMacs> ruMacList = new ArrayList<RemoteUcastMacs>();
+ List<RemoteUcastMacs> ruMacList = new ArrayList<>();
ruMacList.addAll(result1);
ruMacList.addAll(result2);
List<RemoteUcastMacs> result = cmd.transform(nodePath, haAug.getRemoteUcastMacs());
HwvtepGlobalAugmentation d1Aug = src.getAugmentation(HwvtepGlobalAugmentation.class);
HwvtepGlobalAugmentation haAug = dst.getAugmentation(HwvtepGlobalAugmentation.class);
List<RemoteMcastMacs> d1Values =
- d1Aug.getRemoteMcastMacs() != null ? d1Aug.getRemoteMcastMacs() : new ArrayList<RemoteMcastMacs>();
+ d1Aug.getRemoteMcastMacs() != null ? d1Aug.getRemoteMcastMacs() : new ArrayList<>();
List<RemoteMcastMacs> result1 = cmd.transform(nodePath, d1Values);
List<RemoteMcastMacs> result2 = cmd.transform(nodePath, haAug.getRemoteMcastMacs());
HwvtepGlobalAugmentation haAug = ha.getAugmentation(HwvtepGlobalAugmentation.class);
List<RemoteMcastMacs> d1Values =
- d1Aug.getRemoteMcastMacs() != null ? d1Aug.getRemoteMcastMacs() : new ArrayList<RemoteMcastMacs>();
+ d1Aug.getRemoteMcastMacs() != null ? d1Aug.getRemoteMcastMacs() : new ArrayList<>();
List<RemoteMcastMacs> result1 = cmd.transform(nodePath, d1Values);
List<RemoteMcastMacs> d2Values =
- d2Aug.getRemoteMcastMacs() != null ? d2Aug.getRemoteMcastMacs() : new ArrayList<RemoteMcastMacs>();
+ d2Aug.getRemoteMcastMacs() != null ? d2Aug.getRemoteMcastMacs() : new ArrayList<>();
List<RemoteMcastMacs> result2 = cmd.transform(nodePath, d2Values);
- List<RemoteMcastMacs> rmMacList = new ArrayList<RemoteMcastMacs>();
+ List<RemoteMcastMacs> rmMacList = new ArrayList<>();
rmMacList.addAll(result1);
rmMacList.addAll(result2);
HwvtepGlobalAugmentation d1Aug = src.getAugmentation(HwvtepGlobalAugmentation.class);
HwvtepGlobalAugmentation haAug = dst.getAugmentation(HwvtepGlobalAugmentation.class);
List<LocalUcastMacs> d1Values =
- d1Aug.getLocalUcastMacs() != null ? d1Aug.getLocalUcastMacs() : new ArrayList<LocalUcastMacs>();
+ d1Aug.getLocalUcastMacs() != null ? d1Aug.getLocalUcastMacs() : new ArrayList<>();
List<LocalUcastMacs> result1 = cmd.transform(nodePath, d1Values);
List<LocalUcastMacs> result2 = cmd.transform(nodePath, haAug.getLocalUcastMacs());
HwvtepGlobalAugmentation haAug = ha.getAugmentation(HwvtepGlobalAugmentation.class);
List<LocalUcastMacs> d1Values =
- d1Aug.getLocalUcastMacs() != null ? d1Aug.getLocalUcastMacs() : new ArrayList<LocalUcastMacs>();
+ d1Aug.getLocalUcastMacs() != null ? d1Aug.getLocalUcastMacs() : new ArrayList<>();
List<LocalUcastMacs> result1 = cmd.transform(nodePath, d1Values);
List<LocalUcastMacs> d2Values =
- d2Aug.getLocalUcastMacs() != null ? d2Aug.getLocalUcastMacs() : new ArrayList<LocalUcastMacs>();
+ d2Aug.getLocalUcastMacs() != null ? d2Aug.getLocalUcastMacs() : new ArrayList<>();
List<LocalUcastMacs> result2 = cmd.transform(nodePath, d2Values);
List<LocalUcastMacs> result = cmd.transform(nodePath, haAug.getLocalUcastMacs());
- List<LocalUcastMacs> luMacList = new ArrayList<LocalUcastMacs>();
+ List<LocalUcastMacs> luMacList = new ArrayList<>();
luMacList.addAll(result1);
luMacList.addAll(result2);
HwvtepGlobalAugmentation d1Aug = src.getAugmentation(HwvtepGlobalAugmentation.class);
HwvtepGlobalAugmentation haAug = dst.getAugmentation(HwvtepGlobalAugmentation.class);
List<LocalMcastMacs> d1Values =
- d1Aug.getLocalUcastMacs() != null ? d1Aug.getLocalMcastMacs() : new ArrayList<LocalMcastMacs>();
+ d1Aug.getLocalUcastMacs() != null ? d1Aug.getLocalMcastMacs() : new ArrayList<>();
List<LocalMcastMacs> result1 = cmd.transform(nodePath, d1Values);
List<LocalMcastMacs> result2 = cmd.transform(nodePath, haAug.getLocalMcastMacs());
HwvtepGlobalAugmentation d2Aug = d2.getAugmentation(HwvtepGlobalAugmentation.class);
HwvtepGlobalAugmentation haAug = ha.getAugmentation(HwvtepGlobalAugmentation.class);
List<LocalMcastMacs> d1Values =
- d1Aug.getLocalUcastMacs() != null ? d1Aug.getLocalMcastMacs() : new ArrayList<LocalMcastMacs>();
+ d1Aug.getLocalUcastMacs() != null ? d1Aug.getLocalMcastMacs() : new ArrayList<>();
List<LocalMcastMacs> result1 = cmd.transform(nodePath, d1Values);
List<LocalMcastMacs> d2Values =
- d2Aug.getLocalUcastMacs() != null ? d2Aug.getLocalMcastMacs() : new ArrayList<LocalMcastMacs>();
+ d2Aug.getLocalUcastMacs() != null ? d2Aug.getLocalMcastMacs() : new ArrayList<>();
List<LocalMcastMacs> result2 = cmd.transform(nodePath, d2Values);
List<LocalMcastMacs> result = cmd.transform(nodePath, haAug.getLocalMcastMacs());
- List<LocalMcastMacs> lmMacList = new ArrayList<LocalMcastMacs>();
+ List<LocalMcastMacs> lmMacList = new ArrayList<>();
lmMacList.addAll(result1);
lmMacList.addAll(result2);
LOG.error("UnknowHostException in removeRoute. Failed to remove Route for ipPrefix {}", ipAddress, e);
return;
}
- List<MatchInfo> matches = new ArrayList<MatchInfo>();
+ List<MatchInfo> matches = new ArrayList<>();
matches.add(new MatchMetadata(MetaDataUtil.getVpnIdMetadata(vpnId), MetaDataUtil.METADATA_MASK_VRFID));
}
private void removeLFibTableEntry(BigInteger dpnId, long serviceId) {
- List<MatchInfo> matches = new ArrayList<MatchInfo>();
+ List<MatchInfo> matches = new ArrayList<>();
matches.add(MatchEthernetType.MPLS_UNICAST);
matches.add(new MatchMplsLabel(serviceId));
private void removeTunnelTableEntry(BigInteger dpnId, long serviceId) {
LOG.info("remove terminatingServiceActions called with DpnId = {} and label = {}", dpnId, serviceId);
- List<MatchInfo> mkMatches = new ArrayList<MatchInfo>();
+ List<MatchInfo> mkMatches = new ArrayList<>();
// Matching metadata
mkMatches.add(new MatchTunnelId(BigInteger.valueOf(serviceId)));
Flow flowEntity = MDSALUtil.buildFlowNew(NwConstants.INTERNAL_TUNNEL_TABLE,
}
private void makeTunnelTableEntry(BigInteger dpnId, long serviceId, List<Instruction> customInstructions) {
- List<MatchInfo> mkMatches = new ArrayList<MatchInfo>();
+ List<MatchInfo> mkMatches = new ArrayList<>();
LOG.info("create terminatingServiceAction on DpnId = {} and serviceId = {} and actions = {}", dpnId, serviceId);
LOG.error("UnknowHostException in addRoute. Failed to add Route for ipPrefix {}", ipAddress, e);
return;
}
- List<MatchInfo> matches = new ArrayList<MatchInfo>();
+ List<MatchInfo> matches = new ArrayList<>();
matches.add(new MatchMetadata(MetaDataUtil.getVpnIdMetadata(vpnId), MetaDataUtil.METADATA_MASK_VRFID));
}
private void makeLFibTableEntry(BigInteger dpId, long serviceId, List<Instruction> customInstructions) {
- List<MatchInfo> matches = new ArrayList<MatchInfo>();
+ List<MatchInfo> matches = new ArrayList<>();
matches.add(MatchEthernetType.MPLS_UNICAST);
matches.add(new MatchMplsLabel(serviceId));
- List<Instruction> instructions = new ArrayList<Instruction>();
- List<ActionInfo> actionsInfos = new ArrayList<ActionInfo>();
+ List<Instruction> instructions = new ArrayList<>();
+ List<ActionInfo> actionsInfos = new ArrayList<>();
actionsInfos.add(new ActionPopMpls());
Instruction writeInstruction = new InstructionApplyActions(actionsInfos).buildInstruction(0);
instructions.add(writeInstruction);
InstanceIdentifier.builder(FibEntries.class).child(VrfTables.class, new VrfTablesKey(rd));
InstanceIdentifier<VrfTables> vrfTableId = idBuilder.build();
VrfTablesBuilder vrfTablesBuilder = new VrfTablesBuilder().setKey(new VrfTablesKey(rd))
- .setRouteDistinguisher(rd).setVrfEntry(new ArrayList<VrfEntry>());
+ .setRouteDistinguisher(rd).setVrfEntry(new ArrayList<>());
if (writeConfigTxn != null) {
writeConfigTxn.put(LogicalDatastoreType.CONFIGURATION, vrfTableId, vrfTablesBuilder.build());
} else {
this.transportType = transportType;
}
- private static final Map<String, L3VPNTransportTypes> STR_TO_TYPE_MAP = new HashMap<String, L3VPNTransportTypes>();
+ private static final Map<String, L3VPNTransportTypes> STR_TO_TYPE_MAP = new HashMap<>();
static {
for (L3VPNTransportTypes type : L3VPNTransportTypes.values()) {
}
protected List<ActionInfo> getEgressActionsForInterface(String ifName) {
- List<ActionInfo> listActionInfo = new ArrayList<ActionInfo>();
+ List<ActionInfo> listActionInfo = new ArrayList<>();
try {
Future<RpcResult<GetEgressActionsForInterfaceOutput>> result =
interfaceManager.getEgressActionsForInterface(
if (macAddress == null) {
macAddress = FibUtil.getMacAddressFromPrefix(dataBroker, ifName, ipAddress);
}
- List<BucketInfo> listBucketInfo = new ArrayList<BucketInfo>();
+ List<BucketInfo> listBucketInfo = new ArrayList<>();
List<ActionInfo> listActionInfo = new ArrayList<>();
// MAC re-write
if (macAddress != null) {
prefixBuilder.setIpAddress(lri.getPrefix());
// Increment the refCount here
InstanceIdentifier<LabelRouteInfo> lriId = InstanceIdentifier.builder(LabelRouteMap.class)
- .child(LabelRouteInfo.class, new LabelRouteInfoKey((long) lri.getLabel())).build();
+ .child(LabelRouteInfo.class, new LabelRouteInfoKey(lri.getLabel())).build();
LabelRouteInfoBuilder builder = new LabelRouteInfoBuilder(lri);
if (!isPresentInList) {
LOG.debug("vpnName {} is not present in LRI with label {}..", vpnInstanceName, lri.getLabel());
vrfEntry.getLabel(), lri.getVpnInterfaceName(), lri.getDpnId());
}
}
- final List<InstructionInfo> instructions = new ArrayList<InstructionInfo>();
+ final List<InstructionInfo> instructions = new ArrayList<>();
BigInteger subnetRouteMeta = ((BigInteger.valueOf(elanTag)).shiftLeft(32))
.or((BigInteger.valueOf(vpnId).shiftLeft(1)));
instructions.add(new InstructionWriteMetadata(subnetRouteMeta, MetaDataUtil.METADATA_MASK_SUBNET_ROUTE));
makeConnectedRoute(dpnId, vpnId, vrfEntry, rd, instructions, NwConstants.ADD_FLOW, tx);
if (RouteOrigin.value(vrfEntry.getOrigin()) != RouteOrigin.SELF_IMPORTED) {
- List<ActionInfo> actionsInfos = new ArrayList<ActionInfo>();
+ List<ActionInfo> actionsInfos = new ArrayList<>();
// reinitialize instructions list for LFIB Table
- final List<InstructionInfo> LFIBinstructions = new ArrayList<InstructionInfo>();
+ final List<InstructionInfo> LFIBinstructions = new ArrayList<>();
actionsInfos.add(new ActionPopMpls());
LFIBinstructions.add(new InstructionApplyActions(actionsInfos));
}
private List<BigInteger> getDpnIdForPrefix(DataBroker broker, Long vpnId, String rd, VrfEntry vrfEntry) {
- List<BigInteger> returnLocalDpnId = new ArrayList<BigInteger>();
+ List<BigInteger> returnLocalDpnId = new ArrayList<>();
Prefixes localNextHopInfo = FibUtil.getPrefixToInterface(broker, vpnId, vrfEntry.getDestPrefix());
if (localNextHopInfo == null) {
private LabelRouteInfo getLabelRouteInfo(Long label) {
InstanceIdentifier<LabelRouteInfo> lriIid = InstanceIdentifier.builder(LabelRouteMap.class)
- .child(LabelRouteInfo.class, new LabelRouteInfoKey((long) label)).build();
+ .child(LabelRouteInfo.class, new LabelRouteInfoKey(label)).build();
Optional<LabelRouteInfo> opResult = read(dataBroker, LogicalDatastoreType.OPERATIONAL, lriIid);
if (opResult.isPresent()) {
return opResult.get();
private boolean deleteLabelRouteInfo(LabelRouteInfo lri, String vpnInstanceName) {
LOG.debug("deleting LRI : for label {} vpninstancename {}", lri.getLabel(), vpnInstanceName);
InstanceIdentifier<LabelRouteInfo> lriId = InstanceIdentifier.builder(LabelRouteMap.class)
- .child(LabelRouteInfo.class, new LabelRouteInfoKey((long) lri.getLabel())).build();
+ .child(LabelRouteInfo.class, new LabelRouteInfoKey(lri.getLabel())).build();
if (lri == null) {
return true;
}
List<String> vpnInstancesList = lri.getVpnInstanceList() != null
- ? lri.getVpnInstanceList() : new ArrayList<String>();
+ ? lri.getVpnInstanceList() : new ArrayList<>();
if (vpnInstancesList.contains(vpnInstanceName)) {
LOG.debug("vpninstance {} name is present", vpnInstanceName);
vpnInstancesList.remove(vpnInstanceName);
tx = dataBroker.newWriteOnlyTransaction();
}
- List<MatchInfo> matches = new ArrayList<MatchInfo>();
+ List<MatchInfo> matches = new ArrayList<>();
matches.add(MatchEthernetType.MPLS_UNICAST);
matches.add(new MatchMplsLabel(label));
}
LOG.trace("manageRemoteRouteOnDPN :: action {}, DpnId {}, vpnId {}, rd {}, destPfx {}",
action, localDpnId, vpnId, rd, destPrefix);
- List<String> nhList = new ArrayList<String>();
List<String> nextHopAddressList = vrfEntry.getNextHopAddressList();
VrfEntry modVrfEntry;
if (nextHopAddressList == null || (nextHopAddressList.isEmpty())) {
- nhList = Arrays.asList(destTepIp);
+ List<String> nhList = Arrays.asList(destTepIp);
modVrfEntry = new VrfEntryBuilder(vrfEntry).setNextHopAddressList(nhList).build();
} else {
modVrfEntry = vrfEntry;
// Instruction to goto L3 InterfaceTable
List<InstructionInfo> instructions = new ArrayList<>();
instructions.add(new InstructionGotoTable(NwConstants.L3_LFIB_TABLE));
- List<MatchInfo> matches = new ArrayList<MatchInfo>();
+ List<MatchInfo> matches = new ArrayList<>();
matches.add(MatchEthernetType.MPLS_UNICAST);
FlowEntity flowEntityToLfib = MDSALUtil.buildFlowEntity(dpnId, NwConstants.INTERNAL_TUNNEL_TABLE,
getTableMissFlowRef(dpnId, NwConstants.INTERNAL_TUNNEL_TABLE,
short icmpv6RaFlags = 0;
String gatewayMac = null;
IpAddress gatewayIp;
- List<String> autoConfigPrefixList = new ArrayList<String>();
- List<String> statefulConfigPrefixList = new ArrayList<String>();
+ List<String> autoConfigPrefixList = new ArrayList<>();
+ List<String> statefulConfigPrefixList = new ArrayList<>();
for (VirtualSubnet subnet : routerPort.getSubnets()) {
gatewayIp = subnet.getGatewayIp();
raPacket.setSourceAddrLength((short)1);
raPacket.setSourceLlAddress(MacAddress.getDefaultInstance(gatewayMac));
- List<PrefixList> prefixList = new ArrayList<PrefixList>();
+ List<PrefixList> prefixList = new ArrayList<>();
PrefixListBuilder prefix = new PrefixListBuilder();
prefix.setOptionType((short)3);
prefix.setOptionLength((short)4);
private HashMap<BigInteger, DpnInterfaceInfo> dpnIfaceList;
public VirtualNetwork() {
- dpnIfaceList = new HashMap<BigInteger, DpnInterfaceInfo>();
+ dpnIfaceList = new HashMap<>();
}
public void setNetworkUuid(Uuid networkUuid) {
static final Logger LOG = LoggerFactory.getLogger(VirtualPort.class);
public VirtualPort() {
- snetInfo = new HashMap<Uuid, SubnetInfo>();
+ snetInfo = new HashMap<>();
serviceBindingStatus = Boolean.FALSE;
}
networkId = UUID.randomUUID().toString();
this.netType = netType;
this.providerNet = providerNet;
- this.subnetIpPrefixMap = new HashMap<String, Subnet>();
+ this.subnetIpPrefixMap = new HashMap<>();
}
String getNetworkId() {
this.mac = macFor(ofPort);
this.id = UUID.randomUUID().toString();
this.name = "tap" + id.substring(0, 11);
- this.fixedIpList = new HashMap<String, PortIp>();
+ this.fixedIpList = new HashMap<>();
ipv6Utils = new Ipv6Utils();
}
return null;
}
- return MDSALUtil.buildGroupEntity(dpId, groupId, subnetName, GroupTypes.GroupAll, new ArrayList<BucketInfo>());
+ return MDSALUtil.buildGroupEntity(dpId, groupId, subnetName, GroupTypes.GroupAll, new ArrayList<>());
}
}
LOG.debug("NAT Service : buildSnatFlowEntity is called for primary NAPT switch dpId {}, routerName {}", dpId,
routerName);
long routerId = NatUtil.getVpnId(dataBroker, routerName);
- List<MatchInfo> matches = new ArrayList<MatchInfo>();
+ List<MatchInfo> matches = new ArrayList<>();
matches.add(MatchEthernetType.IPV4);
matches.add(new MatchMetadata(MetaDataUtil.getVpnIdMetadata(routerId), MetaDataUtil.METADATA_MASK_VRFID));
- List<InstructionInfo> instructions = new ArrayList<InstructionInfo>();
+ List<InstructionInfo> instructions = new ArrayList<>();
instructions.add(new InstructionGotoTable(NwConstants.OUTBOUND_NAPT_TABLE));
String flowRef = getFlowRefSnat(dpId, NwConstants.PSNAT_TABLE, routerName);
matches.add(MatchEthernetType.IPV4);
matches.add(new MatchMetadata(MetaDataUtil.getVpnIdMetadata(changedVpnId), MetaDataUtil.METADATA_MASK_VRFID));
- List<InstructionInfo> instructions = new ArrayList<InstructionInfo>();
+ List<InstructionInfo> instructions = new ArrayList<>();
instructions.add(new InstructionGotoTable(NwConstants.OUTBOUND_NAPT_TABLE));
String flowRef = getFlowRefSnat(dpId, NwConstants.PSNAT_TABLE, routerName);
matches.add(new MatchIpv4Source(externalIp, "32"));
List<ActionInfo> actionsInfo = new ArrayList<>();
- List<InstructionInfo> instructions = new ArrayList<InstructionInfo>();
+ List<InstructionInfo> instructions = new ArrayList<>();
Uuid floatingIpId = mapping.getExternalId();
String macAddress = NatUtil.getFloatingIpPortMacFromFloatingIpId(dataBroker, floatingIpId);
byte[] pktOut = buildNaptPacketOut(ethPkt);
- List<ActionInfo> actionInfos = new ArrayList<ActionInfo>();
+ List<ActionInfo> actionInfos = new ArrayList<>();
if (ethPkt.getPayload() instanceof IPv4) {
IPv4 ipPkt = (IPv4) ethPkt.getPayload();
if ((ipPkt.getPayload() instanceof TCP) || (ipPkt.getPayload() instanceof UDP)) {
public FlowEntity buildSnatFlowEntity(BigInteger dpId, String routerName, long groupId,
long routerVpnId, int addordel) {
FlowEntity flowEntity;
- List<MatchInfo> matches = new ArrayList<MatchInfo>();
+ List<MatchInfo> matches = new ArrayList<>();
matches.add(MatchEthernetType.IPV4);
matches.add(new MatchMetadata(MetaDataUtil.getVpnIdMetadata(routerVpnId), MetaDataUtil.METADATA_MASK_VRFID));
String flowRef = getFlowRefSnat(dpId, NwConstants.PSNAT_TABLE, routerName);
if (addordel == NatConstants.ADD_FLOW) {
- List<ActionInfo> actionsInfo = new ArrayList<ActionInfo>();
+ List<ActionInfo> actionsInfo = new ArrayList<>();
actionsInfo.add(new ActionSetFieldTunnelId(BigInteger.valueOf(routerVpnId)));
LOG.debug("Setting the tunnel to the list of action infos {}", actionsInfo);
actionsInfo.add(new ActionGroup(groupId));
- List<InstructionInfo> instructions = new ArrayList<InstructionInfo>();
+ List<InstructionInfo> instructions = new ArrayList<>();
instructions.add(new InstructionApplyActions(actionsInfo));
flowEntity = MDSALUtil.buildFlowEntity(dpId, NwConstants.PSNAT_TABLE, flowRef,
return futures;
});
}
- List<FixedIps> oldIPs = (original.getFixedIps() != null) ? original.getFixedIps() : new ArrayList<FixedIps>();
- List<FixedIps> newIPs = (update.getFixedIps() != null) ? update.getFixedIps() : new ArrayList<FixedIps>();
+ List<FixedIps> oldIPs = (original.getFixedIps() != null) ? original.getFixedIps() : new ArrayList<>();
+ List<FixedIps> newIPs = (update.getFixedIps() != null) ? update.getFixedIps() : new ArrayList<>();
if (!oldIPs.equals(newIPs)) {
Iterator<FixedIps> iterator = newIPs.iterator();
while (iterator.hasNext()) {
if (vpnId == null) {
vpnId = routerId;
}
- List<Routes> oldRoutes = (original.getRoutes() != null) ? original.getRoutes() : new ArrayList<Routes>();
- List<Routes> newRoutes = (update.getRoutes() != null) ? update.getRoutes() : new ArrayList<Routes>();
+ List<Routes> oldRoutes = (original.getRoutes() != null) ? original.getRoutes() : new ArrayList<>();
+ List<Routes> newRoutes = (update.getRoutes() != null) ? update.getRoutes() : new ArrayList<>();
if (!oldRoutes.equals(newRoutes)) {
Iterator<Routes> iterator = newRoutes.iterator();
while (iterator.hasNext()) {
private void handleChangedRoutes(Uuid vpnName, List<Routes> routes, int addedOrRemoved) {
// Some routes may point to an InterVpnLink's endpoint, lets treat them differently
- List<Routes> interVpnLinkRoutes = new ArrayList<Routes>();
- List<Routes> otherRoutes = new ArrayList<Routes>();
- HashMap<String, InterVpnLink> nexthopsXinterVpnLinks = new HashMap<String, InterVpnLink>();
+ List<Routes> interVpnLinkRoutes = new ArrayList<>();
+ List<Routes> otherRoutes = new ArrayList<>();
+ HashMap<String, InterVpnLink> nexthopsXinterVpnLinks = new HashMap<>();
for ( Routes route : routes ) {
String nextHop = String.valueOf(route.getNexthop().getValue());
// Nexthop is another VPN?
if (null != portId) {
List<Uuid> portList = builder.getPortList();
if (null == portList) {
- portList = new ArrayList<Uuid>();
+ portList = new ArrayList<>();
}
portList.add(portId);
builder.setPortList(portList);
if (null != directPortId) {
List<Uuid> directPortList = builder.getDirectPortList();
if (null == directPortList) {
- directPortList = new ArrayList<Uuid>();
+ directPortList = new ArrayList<>();
}
directPortList.add(directPortId);
builder.setDirectPortList(directPortList);
LOG.debug("Updating vpn interface {}", infName);
if (!isBeingAssociated) {
Adjacencies adjs = vpnIfBuilder.getAugmentation(Adjacencies.class);
- List<Adjacency> adjacencyList = (adjs != null) ? adjs.getAdjacency() : new ArrayList<Adjacency>();
+ List<Adjacency> adjacencyList = (adjs != null) ? adjs.getAdjacency() : new ArrayList<>();
Iterator<Adjacency> adjacencyIter = adjacencyList.iterator();
while (adjacencyIter.hasNext()) {
Adjacency adjacency = adjacencyIter.next();
if (!origExtGw.getExternalFixedIps().isEmpty()) {
if (newExtGw.getExternalFixedIps() != null && !newExtGw.getExternalFixedIps().isEmpty()) {
List<ExternalFixedIps> origExtFixedIps = origExtGw.getExternalFixedIps();
- HashSet<String> origFixedIpSet = new HashSet<String>();
+ HashSet<String> origFixedIpSet = new HashSet<>();
for (ExternalFixedIps fixedIps : origExtFixedIps) {
origFixedIpSet.add(fixedIps.getIpAddress().getIpv4Address().getValue());
}
List<ExternalFixedIps> newExtFixedIps = newExtGw.getExternalFixedIps();
- HashSet<String> updFixedIpSet = new HashSet<String>();
+ HashSet<String> updFixedIpSet = new HashSet<>();
for (ExternalFixedIps fixedIps : newExtFixedIps) {
updFixedIpSet.add(fixedIps.getIpAddress().getIpv4Address().getValue());
}
NetworksBuilder builder = null;
builder = new NetworksBuilder().setKey(new NetworksKey(extNetId)).setId(extNetId);
builder.setVpnid(NeutronvpnUtils.getVpnForNetwork(dataBroker, extNetId));
- builder.setRouterIds(new ArrayList<Uuid>());
+ builder.setRouterIds(new ArrayList<>());
builder.setProviderNetworkType(provType);
Networks networkss = builder.build();
}
List<Uuid> rtrList = builder.getRouterIds();
if (rtrList == null) {
- rtrList = new ArrayList<Uuid>();
+ rtrList = new ArrayList<>();
}
rtrList.add(routerId);
builder.setRouterIds(rtrList);
builder.setNetworkId(extNetId);
builder.setEnableSnat(update.getExternalGatewayInfo().isEnableSnat());
- ArrayList<String> extFixedIps = new ArrayList<String>();
+ ArrayList<String> extFixedIps = new ArrayList<>();
for (ExternalFixedIps fixedIps : update.getExternalGatewayInfo().getExternalFixedIps()) {
extFixedIps.add(fixedIps.getIpAddress().getIpv4Address().getValue());
}
if (optionalRouters.isPresent()) {
RoutersBuilder builder = new RoutersBuilder(optionalRouters.get());
if (builder != null) {
- ArrayList<String> extFixedIps = new ArrayList<String>();
+ ArrayList<String> extFixedIps = new ArrayList<>();
for (ExternalFixedIps fixedIps : update.getExternalGatewayInfo().getExternalFixedIps()) {
extFixedIps.add(fixedIps.getIpAddress().getIpv4Address().getValue());
}
if (locks.get(lockName) != null) {
synchronized (locks) {
if (locks.get(lockName) == null) {
- locks.putIfAbsent(lockName, new ImmutablePair<ReadWriteLock, AtomicInteger>(new
+ locks.putIfAbsent(lockName, new ImmutablePair<>(new
ReentrantReadWriteLock(), new AtomicInteger(0)));
}
locks.get(lockName).getRight().incrementAndGet();
throw new RuntimeException(String.format("Unable to acquire lock for %s", lockName), e.getCause());
}
} else {
- locks.putIfAbsent(lockName, new ImmutablePair<ReadWriteLock, AtomicInteger>(new ReentrantReadWriteLock(),
+ locks.putIfAbsent(lockName, new ImmutablePair<>(new ReentrantReadWriteLock(),
new AtomicInteger(0)));
locks.get(lockName).getRight().incrementAndGet();
try {
subnetsBuilder.setGatewayIp(new IpAddress("0.0.0.0".toCharArray()));
subnetsBuilder.setKey(new SubnetsKey(new IpPrefix(subnetIp.toCharArray())));
subnetsBuilder.setVlanId(0);
- subnetsBuilder.setVteps(new ArrayList<Vteps>());
+ subnetsBuilder.setVteps(new ArrayList<>());
return subnetsBuilder.build();
}
IpAddress ipv6 = new IpAddress(new Ipv6Address("1::1"));
FixedIpsBuilder fib = new FixedIpsBuilder();
fib.setIpAddress(ipv6);
- List<FixedIps> fixedIps = new ArrayList<FixedIps>();
+ List<FixedIps> fixedIps = new ArrayList<>();
fixedIps.add(fib.build());
pb.setFixedIps(fixedIps);
Port port = pb.build();
IpAddress ipv4 = new IpAddress(new Ipv4Address("2.2.2.2"));
FixedIpsBuilder fib = new FixedIpsBuilder();
fib.setIpAddress(ipv4);
- List<FixedIps> fixedIps = new ArrayList<FixedIps>();
+ List<FixedIps> fixedIps = new ArrayList<>();
fixedIps.add(fib.build());
pb.setFixedIps(fixedIps);
Port port = pb.build();
pb.setUuid(new Uuid("12345678-1234-1234-1234-123456789012"));
pb.setNetworkId(new Uuid("12345678-1234-1234-1234-123456789012"));
pb.setMacAddress(new MacAddress("AA:BB:CC:DD:EE:FF"));
- List<FixedIps> fixedIps = new ArrayList<FixedIps>();
+ List<FixedIps> fixedIps = new ArrayList<>();
pb.setFixedIps(fixedIps);
Port port = pb.build();
neutronPortChangeListener.add(InstanceIdentifier.create(Port.class), port);
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.node.attributes.OpenvswitchOtherConfigsBuilder;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node;
import org.opendaylight.yangtools.concepts.ListenerRegistration;
-import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
@RunWith(MockitoJUnitRunner.class)
when(neutronvpnManager.updateSubnetmapNodeWithPorts(any(Uuid.class), any(Uuid.class), any(Uuid.class)))
.thenReturn(subnetMap);
- when(mockReadTx.<DataObject>read(any(LogicalDatastoreType.class), any(InstanceIdentifier.class)))
+ when(mockReadTx.read(any(LogicalDatastoreType.class), any(InstanceIdentifier.class)))
.thenReturn(Futures.immediateCheckedFuture(Optional.absent()));
interfaceStateToTransportZoneChangeListener =
new InterfaceStateToTransportZoneListener(dataBroker, neutronvpnManager);
interf = new InterfacesBuilder().setInterface(interfaces).build();
port = buildPort(PORT_IP);
buildNode();
- when(mockReadTx.<DataObject>read(any(LogicalDatastoreType.class), any(InstanceIdentifier.class)))
+ when(mockReadTx.read(any(LogicalDatastoreType.class), any(InstanceIdentifier.class)))
.thenReturn(Futures.immediateCheckedFuture(Optional.of(interf)))
.thenReturn(Futures.immediateCheckedFuture(Optional.of(port)))
.thenReturn(Futures.immediateCheckedFuture(Optional.absent()))
TransportZone tz = new TransportZoneBuilder().setZoneName(NETWORK_ID)
.setTunnelType(TunnelTypeVxlan.class).setSubnets(new ArrayList<>()).build();
buildNode();
- when(mockReadTx.<DataObject>read(any(LogicalDatastoreType.class), any(InstanceIdentifier.class)))
+ when(mockReadTx.read(any(LogicalDatastoreType.class), any(InstanceIdentifier.class)))
.thenReturn(Futures.immediateCheckedFuture(Optional.of(interf)))
.thenReturn(Futures.immediateCheckedFuture(Optional.of(port)))
.thenReturn(Futures.immediateCheckedFuture(Optional.of(network)))
TransportZone tz = new TransportZoneBuilder().setZoneName(NETWORK_ID)
.setTunnelType(TunnelTypeVxlan.class).setSubnets(new ArrayList<>()).build();
buildNode();
- when(mockReadTx.<DataObject>read(any(LogicalDatastoreType.class), any(InstanceIdentifier.class)))
+ when(mockReadTx.read(any(LogicalDatastoreType.class), any(InstanceIdentifier.class)))
.thenReturn(Futures.immediateCheckedFuture(Optional.of(interf)))
.thenReturn(Futures.immediateCheckedFuture(Optional.of(port)))
.thenReturn(Futures.immediateCheckedFuture(Optional.of(network)))
TransportZone tz = new TransportZoneBuilder().setZoneName(NETWORK_ID)
.setTunnelType(TunnelTypeVxlan.class).setSubnets(buildSubnets()).build();
buildNode();
- when(mockReadTx.<DataObject>read(any(LogicalDatastoreType.class), any(InstanceIdentifier.class)))
+ when(mockReadTx.read(any(LogicalDatastoreType.class), any(InstanceIdentifier.class)))
.thenReturn(Futures.immediateCheckedFuture(Optional.of(interf)))
.thenReturn(Futures.immediateCheckedFuture(Optional.of(port)))
.thenReturn(Futures.immediateCheckedFuture(Optional.of(network)));
@Test
public void addRouter() throws Exception {
- when(mockReadTx.<DataObject>read(any(LogicalDatastoreType.class), any(InstanceIdentifier.class)))
+ when(mockReadTx.read(any(LogicalDatastoreType.class), any(InstanceIdentifier.class)))
.thenReturn(Futures.immediateCheckedFuture(Optional.absent()));
RouterDpnListBuilder intBuilder = new RouterDpnListBuilder();
RouterDpnList routerDpnList = buildRouterDpnList();
private RouterDpnList buildRouterDpnList() {
RouterDpnListBuilder routerDpnBuilder = new RouterDpnListBuilder();
routerDpnBuilder.setRouterId(ROUTER_ID);
- List<DpnVpninterfacesList> list = new ArrayList<DpnVpninterfacesList>();
+ List<DpnVpninterfacesList> list = new ArrayList<>();
list.add(new DpnVpninterfacesListBuilder().setDpnId(BigInteger.valueOf(DPN_ID)).build());
list.add(new DpnVpninterfacesListBuilder().setDpnId(DPN_ID_2).build());
routerDpnBuilder.setDpnVpninterfacesList(list);
private List<Subnets> buildSubnets() {
SubnetsBuilder subnetsBuilder = new SubnetsBuilder();
- List<Vteps> vteps = new ArrayList<Vteps>();
+ List<Vteps> vteps = new ArrayList<>();
vteps.add(buildVtep(DPN_ID_2, OVS_IP_2, VTEP_PORT));
subnetsBuilder.setVteps(vteps);
public static Optional<InterVpnLinkDataComposite> getInterVpnLinkByName(String iVpnLinkName) {
ConcurrentHashMap<String, InterVpnLinkDataComposite> cache =
(ConcurrentHashMap<String, InterVpnLinkDataComposite>) CacheUtil.getCache(IVPNLINK_NAME_2_IVPNLINK_CACHE_NAME);
- return (cache == null) ? Optional.<InterVpnLinkDataComposite>absent()
+ return (cache == null) ? Optional.absent()
: Optional.fromNullable(cache.get(iVpnLinkName));
}
LOG.trace("Checking if {} is configured as an InterVpnLink endpoint", endpointIp);
ConcurrentHashMap<String, InterVpnLinkDataComposite> cache =
(ConcurrentHashMap<String, InterVpnLinkDataComposite>) CacheUtil.getCache(ENDPOINT_2_IVPNLINK_CACHE_NAME);
- return (cache == null) ? Optional.<InterVpnLinkDataComposite>absent()
+ return (cache == null) ? Optional.absent()
: Optional.fromNullable(cache.get(endpointIp));
}
public static Optional<InterVpnLinkDataComposite> getInterVpnLinkByVpnId(String vpnId) {
ConcurrentHashMap<String, InterVpnLinkDataComposite> cache =
(ConcurrentHashMap<String, InterVpnLinkDataComposite>) CacheUtil.getCache(UUID_2_IVPNLINK_CACHE_NAME);
- return (cache == null) ? Optional.<InterVpnLinkDataComposite>absent() : Optional.fromNullable(cache.get(vpnId));
+ return (cache == null) ? Optional.absent() : Optional.fromNullable(cache.get(vpnId));
}
public static List<InterVpnLinkDataComposite> getAllInterVpnLinks() {
ConcurrentHashMap<String, InterVpnLinkDataComposite> cache =
(ConcurrentHashMap<String, InterVpnLinkDataComposite>) CacheUtil.getCache(UUID_2_IVPNLINK_CACHE_NAME);
- return (cache == null) ? Collections.<InterVpnLinkDataComposite>emptyList()
+ return (cache == null) ? Collections.emptyList()
: Collections.list(cache.elements());
}
public List<BigInteger> getFirstEndpointDpns() {
return ( !isComplete() || this.interVpnLinkState.getFirstEndpointState().getDpId() == null )
- ? Collections.<BigInteger>emptyList()
+ ? Collections.emptyList()
: this.interVpnLinkState.getFirstEndpointState().getDpId();
}
public List<BigInteger> getSecondEndpointDpns() {
return (!isComplete() || this.interVpnLinkState.getSecondEndpointState().getDpId() == null )
- ? Collections.<BigInteger>emptyList()
+ ? Collections.emptyList()
: this.interVpnLinkState.getSecondEndpointState().getDpId();
}
public static TransmitPacketInput createArpRequestInput(BigInteger dpnId, byte[] abySenderMAC,
byte[] abySenderIpAddress, byte[] abyTargetIpAddress, NodeConnectorRef ingress) {
return createArpRequestInput(dpnId, null, abySenderMAC, (byte[]) null, abySenderIpAddress, abyTargetIpAddress,
- ingress, new ArrayList<ActionInfo>());
+ ingress, new ArrayList<>());
}
public static TransmitPacketInput createArpRequestInput(BigInteger dpnId, Long groupId, byte[] abySenderMAC,
byte[] abySenderIpAddress, byte[] abyTargetIpAddress, NodeConnectorRef ingress) {
- List<ActionInfo> lstActionInfo = new ArrayList<ActionInfo>();
+ List<ActionInfo> lstActionInfo = new ArrayList<>();
return createArpRequestInput(dpnId, groupId, abySenderMAC, null, abySenderIpAddress, abyTargetIpAddress,
ingress, lstActionInfo);
}
WriteTransaction writeInvTxn = dataBroker.newWriteOnlyTransaction();
vpnInterfaceManager.processVpnInterfaceUp(dpnId, vpnInterface, ifIndex, false,
writeConfigTxn, writeOperTxn, writeInvTxn);
- List<ListenableFuture<Void>> futures = new ArrayList<ListenableFuture<Void>>();
+ List<ListenableFuture<Void>> futures = new ArrayList<>();
futures.add(writeOperTxn.submit());
futures.add(writeConfigTxn.submit());
futures.add(writeInvTxn.submit());
WriteTransaction writeInvTxn = dataBroker.newWriteOnlyTransaction();
vpnInterfaceManager.processVpnInterfaceDown(dpnId, interfaceName, ifIndex, false, false,
writeConfigTxn, writeOperTxn, writeInvTxn);
- List<ListenableFuture<Void>> futures = new ArrayList<ListenableFuture<Void>>();
+ List<ListenableFuture<Void>> futures = new ArrayList<>();
futures.add(writeOperTxn.submit());
futures.add(writeConfigTxn.submit());
futures.add(writeInvTxn.submit());
WriteTransaction writeInvTxn = dataBroker.newWriteOnlyTransaction();
vpnInterfaceManager.processVpnInterfaceUp(dpnId, vpnInterface, ifIndex,
true, writeConfigTxn, writeOperTxn, writeInvTxn);
- List<ListenableFuture<Void>> futures = new ArrayList<ListenableFuture<Void>>();
+ List<ListenableFuture<Void>> futures = new ArrayList<>();
futures.add(writeOperTxn.submit());
futures.add(writeConfigTxn.submit());
futures.add(writeInvTxn.submit());
WriteTransaction writeInvTxn = dataBroker.newWriteOnlyTransaction();
vpnInterfaceManager.processVpnInterfaceDown(dpnId, interfaceName, ifIndex, true,
false, writeConfigTxn, writeOperTxn, writeInvTxn);
- List<ListenableFuture<Void>> futures = new ArrayList<ListenableFuture<Void>>();
+ List<ListenableFuture<Void>> futures = new ArrayList<>();
futures.add(writeOperTxn.submit());
futures.add(writeConfigTxn.submit());
futures.add(writeInvTxn.submit());
return null;
}
SubnetToDpnBuilder subDpnBuilder = new SubnetToDpnBuilder().setKey(new SubnetToDpnKey(dpnId));
- List<VpnInterfaces> vpnIntfList = new ArrayList<VpnInterfaces>();
+ List<VpnInterfaces> vpnIntfList = new ArrayList<>();
subDpnBuilder.setVpnInterfaces(vpnIntfList);
SubnetToDpn subDpn = subDpnBuilder.build();
LOG.trace("Creating SubnetToDpn entry for subnet " + subnetId.getValue() + " with DPNId " + dpnId);
*/
Iterator<String> interfacelistIter = srcDpninterfacelist.iterator();
String intfName = null;
- List<Uuid> subnetList = new ArrayList<Uuid>();
- Map<Long, String> vpnIdRdMap = new HashMap<Long, String>();
+ List<Uuid> subnetList = new ArrayList<>();
+ Map<Long, String> vpnIdRdMap = new HashMap<>();
while (interfacelistIter.hasNext()) {
intfName = interfacelistIter.next();
String rd = config.getRouteDistinguisher();
List<VpnTarget> vpnTargetList = config.getVpnTargets().getVpnTarget();
- List<String> ertList = new ArrayList<String>();
- List<String> irtList = new ArrayList<String>();
+ List<String> ertList = new ArrayList<>();
+ List<String> irtList = new ArrayList<>();
if (vpnTargetList != null) {
for (VpnTarget vpnTarget : vpnTargetList) {
delAdjFromVpnInterface(identifier, adj, dpnId, writeOperTxn, writeConfigTxn);
}
}
- List<ListenableFuture<Void>> futures = new ArrayList<ListenableFuture<Void>>();
+ List<ListenableFuture<Void>> futures = new ArrayList<>();
futures.add(writeOperTxn.submit());
futures.add(writeConfigTxn.submit());
futures.add(writeInvTxn.submit());
() -> {
WriteTransaction writeConfigTxn = dataBroker.newWriteOnlyTransaction();
createFibEntryForRouterInterface(vpnInterface, interfaceName, writeConfigTxn);
- List<ListenableFuture<Void>> futures = new ArrayList<ListenableFuture<Void>>();
+ List<ListenableFuture<Void>> futures = new ArrayList<>();
futures.add(writeConfigTxn.submit());
return futures;
});
() -> {
WriteTransaction writeTxn = dataBroker.newWriteOnlyTransaction();
int instructionKey = 0;
- List<Instruction> instructions = new ArrayList<Instruction>();
+ List<Instruction> instructions = new ArrayList<>();
instructions.add(
MDSALUtil.buildAndGetWriteMetadaInstruction(MetaDataUtil.getVpnIdMetadata(vpnId),
writeTxn.put(LogicalDatastoreType.CONFIGURATION, InterfaceUtils.buildServiceId(vpnInterfaceName,
ServiceIndex.getIndex(NwConstants.L3VPN_SERVICE_NAME, NwConstants.L3VPN_SERVICE_INDEX)),
serviceInfo, true);
- List<ListenableFuture<Void>> futures = new ArrayList<ListenableFuture<Void>>();
+ List<ListenableFuture<Void>> futures = new ArrayList<>();
futures.add(writeTxn.submit());
return futures;
});
String rd = getRouteDistinguisher(vpnInterface.getVpnInstanceName());
rd = (rd != null) ? rd : vpnInterface.getVpnInstanceName();
Adjacencies adjacencies = vpnInterface.getAugmentation(Adjacencies.class);
- List<Adjacency> adjList = (adjacencies != null) ? adjacencies.getAdjacency() : new ArrayList<Adjacency>();
+ List<Adjacency> adjList = (adjacencies != null) ? adjacencies.getAdjacency() : new ArrayList<>();
String prefix = null;
long label = 0;
- List<String> nhList = new ArrayList<String>();
+ List<String> nhList = new ArrayList<>();
boolean nextHopAdded = false;
long vpnId = VpnUtil.getVpnId(dataBroker, vpnInterface.getVpnInstanceName());
String rd = getRouteDistinguisher(vpnInterface.getVpnInstanceName());
rd = (rd != null) ? rd : vpnInterface.getVpnInstanceName();
Adjacencies adjacencies = vpnInterface.getAugmentation(Adjacencies.class);
- List<Adjacency> adjList = (adjacencies != null) ? adjacencies.getAdjacency() : new ArrayList<Adjacency>();
+ List<Adjacency> adjList = (adjacencies != null) ? adjacencies.getAdjacency() : new ArrayList<>();
String prefix = null;
long label = 0;
- List<String> nhList = new ArrayList<String>();
+ List<String> nhList = new ArrayList<>();
boolean isNextHopRemoveReqd = false;
BigInteger srcDpnId = new BigInteger(stateTunnelList.getSrcInfo().getTepDeviceId());
long vpnId = VpnUtil.getVpnId(dataBroker, vpnInterface.getVpnInstanceName());
updateLabelMapper(label, nhList);
// Update the VRF entry with emtpy nextHop
- fibManager.updateFibEntry(dataBroker, rd, prefix, new ArrayList<String>() /* empty */, null);
+ fibManager.updateFibEntry(dataBroker, rd, prefix, new ArrayList<>() /* empty */, null);
//Get the list of VPN's importing this route(prefix) .
// Then update the VRF entry with nhList
WriteTransaction writeInvTxn = dataBroker.newWriteOnlyTransaction();
processVpnInterfaceDown(dpId, interfaceName, ifIndex, false, true, writeConfigTxn, writeOperTxn,
writeInvTxn);
- List<ListenableFuture<Void>> futures = new ArrayList<ListenableFuture<Void>>();
+ List<ListenableFuture<Void>> futures = new ArrayList<>();
futures.add(writeOperTxn.submit());
futures.add(writeConfigTxn.submit());
futures.add(writeInvTxn.submit());
() -> {
WriteTransaction writeConfigTxn = dataBroker.newWriteOnlyTransaction();
deleteFibEntryForRouterInterface(vpnInterface, writeConfigTxn);
- List<ListenableFuture<Void>> futures = new ArrayList<ListenableFuture<Void>>();
+ List<ListenableFuture<Void>> futures = new ArrayList<>();
futures.add(writeConfigTxn.submit());
return futures;
});
ServiceIndex.getIndex(NwConstants.L3VPN_SERVICE_NAME,
NwConstants.L3VPN_SERVICE_INDEX)));
- List<ListenableFuture<Void>> futures = new ArrayList<ListenableFuture<Void>>();
+ List<ListenableFuture<Void>> futures = new ArrayList<>();
futures.add(writeTxn.submit());
return futures;
});
final UpdateData updateData = new UpdateData(identifier, original, update);
final Adjacencies origAdjs = original.getAugmentation(Adjacencies.class);
final List<Adjacency> oldAdjs = (origAdjs != null && origAdjs.getAdjacency()
- != null) ? origAdjs.getAdjacency() : new ArrayList<Adjacency>();
+ != null) ? origAdjs.getAdjacency() : new ArrayList<>();
final Adjacencies updateAdjs = update.getAugmentation(Adjacencies.class);
final List<Adjacency> newAdjs = (updateAdjs != null && updateAdjs.getAdjacency()
- != null) ? updateAdjs.getAdjacency() : new ArrayList<Adjacency>();
+ != null) ? updateAdjs.getAdjacency() : new ArrayList<>();
//handles switching between <internal VPN - external VPN>
if (oldVpnName != null && !oldVpnName.equals(newVpnName)) {
}
final Adjacencies origAdjs = updData.getOriginal().getAugmentation(Adjacencies.class);
final List<Adjacency> oldAdjs = (origAdjs != null && origAdjs.getAdjacency() != null)
- ? origAdjs.getAdjacency() : new ArrayList<Adjacency>();
+ ? origAdjs.getAdjacency() : new ArrayList<>();
final Adjacencies updateAdjs = updData.getUpdate().getAugmentation(Adjacencies.class);
final List<Adjacency> newAdjs = (updateAdjs != null && updateAdjs.getAdjacency() != null)
- ? updateAdjs.getAdjacency() : new ArrayList<Adjacency>();
+ ? updateAdjs.getAdjacency() : new ArrayList<>();
addVpnInterface(updData.getIdentifier(), updData.getUpdate(), oldAdjs, newAdjs);
LOG.trace("Processed Add for update on VPNInterface {} upon VPN swap",
updData.getUpdate().getName());
public List<ListenableFuture<Void>> call() throws Exception {
WriteTransaction writeOperTxn = dataBroker.newWriteOnlyTransaction();
postProcessVpnInterfaceRemoval(identifier, del, writeOperTxn);
- List<ListenableFuture<Void>> futures = new ArrayList<ListenableFuture<Void>>();
+ List<ListenableFuture<Void>> futures = new ArrayList<>();
futures.add(writeOperTxn.submit());
return futures;
}
// Instruction to goto L3 InterfaceTable
List<InstructionInfo> instructions =
Collections.singletonList(new InstructionGotoTable(NwConstants.L3_INTERFACE_TABLE));
- List<MatchInfo> matches = new ArrayList<MatchInfo>();
+ List<MatchInfo> matches = new ArrayList<>();
FlowEntity flowEntityLfib = MDSALUtil.buildFlowEntity(dpnId, NwConstants.L3_LFIB_TABLE,
getTableMissFlowRef(dpnId, NwConstants.L3_LFIB_TABLE, NwConstants.TABLE_MISS_FLOW),
NwConstants.TABLE_MISS_PRIORITY, "Table Miss", 0, 0, cookieTableMiss, matches, instructions);
}
private void makeL3IntfTblMissFlow(WriteTransaction writeFlowTx, BigInteger dpnId, int addOrRemove) {
- List<InstructionInfo> instructions = new ArrayList<InstructionInfo>();
- List<MatchInfo> matches = new ArrayList<MatchInfo>();
+ List<InstructionInfo> instructions = new ArrayList<>();
+ List<MatchInfo> matches = new ArrayList<>();
final BigInteger cookieTableMiss = new BigInteger("1030000", 16);
// Instruction to goto L3 InterfaceTable
private void makeSubnetRouteTableMissFlow(WriteTransaction writeFlowTx, BigInteger dpnId, int addOrRemove) {
final BigInteger cookieTableMiss = new BigInteger("8000004", 16);
- List<ActionInfo> actionsInfos = new ArrayList<ActionInfo>();
- List<InstructionInfo> instructions = new ArrayList<InstructionInfo>();
+ List<ActionInfo> actionsInfos = new ArrayList<>();
+ List<InstructionInfo> instructions = new ArrayList<>();
actionsInfos.add(new ActionPuntToController());
instructions.add(new InstructionApplyActions(actionsInfos));
- List<MatchInfo> matches = new ArrayList<MatchInfo>();
+ List<MatchInfo> matches = new ArrayList<>();
String flowRef = getTableMissFlowRef(dpnId, NwConstants.L3_SUBNET_ROUTE_TABLE, NwConstants.TABLE_MISS_FLOW);
FlowEntity flowEntity = MDSALUtil.buildFlowEntity(dpnId, NwConstants.L3_SUBNET_ROUTE_TABLE, flowRef,
NwConstants.TABLE_MISS_PRIORITY, "Subnet Route Table Miss", 0, 0, cookieTableMiss, matches, instructions);
}
private void createTableMissForVpnGwFlow(WriteTransaction writeFlowTx, BigInteger dpId) {
- List<MatchInfo> matches = new ArrayList<MatchInfo>();
+ List<MatchInfo> matches = new ArrayList<>();
List<ActionInfo> actionsInfos =
Collections.singletonList(new ActionNxResubmit(NwConstants.LPORT_DISPATCHER_TABLE));
List<InstructionInfo> instructions = Collections.singletonList(new InstructionApplyActions(actionsInfos));
ArpResponderUtil.retrieveStandardArpResponderGroupId(idManagerService),
ArpResponderConstant.GROUP_FLOW_NAME.value(), buckets);
- final List<MatchInfo> matches = new ArrayList<MatchInfo>();
+ final List<MatchInfo> matches = new ArrayList<>();
matches.add(MatchEthernetType.ARP);
matches.add(MatchArpOp.REQUEST);
final List<ActionInfo> actionInfos = Collections.singletonList(
}
private void createArpResponseMatchFlowForGwMacTable(WriteTransaction writeFlowTx, BigInteger dpId) {
- List<MatchInfo> matches = new ArrayList<MatchInfo>();
+ List<MatchInfo> matches = new ArrayList<>();
matches.add(MatchEthernetType.ARP);
matches.add(MatchArpOp.REPLY);
List<ActionInfo> actionsInfos = new ArrayList<>();
}
private Collection<RpcError> validateAddStaticRouteInput(AddStaticRouteInput input) {
- Collection<RpcError> rpcErrors = new ArrayList<RpcError>();
+ Collection<RpcError> rpcErrors = new ArrayList<>();
String destination = input.getDestination();
String vpnInstanceName = input.getVpnInstanceName();
String nexthop = input.getNexthop();
return;
}
LOG.debug("onSubnetAddedToVpn: Creating new SubnetOpDataEntry node for subnet: " + subnetId.getValue());
- Map<BigInteger, SubnetToDpn> subDpnMap = new HashMap<BigInteger, SubnetToDpn>();
+ Map<BigInteger, SubnetToDpn> subDpnMap = new HashMap<>();
BigInteger dpnId = null;
BigInteger nhDpnId = null;
SubnetToDpn subDpn = null;
}
subOpBuilder.setVrfId(rd);
subOpBuilder.setVpnName(vpnName);
- subOpBuilder.setSubnetToDpn(new ArrayList<SubnetToDpn>());
+ subOpBuilder.setSubnetToDpn(new ArrayList<>());
subOpBuilder.setRouteAdvState(TaskState.Na);
subOpBuilder.setElanTag(elanTag);
}
}
if (subDpnMap.size() > 0) {
- subOpBuilder.setSubnetToDpn(new ArrayList<SubnetToDpn>(subDpnMap.values()));
+ subOpBuilder.setSubnetToDpn(new ArrayList<>(subDpnMap.values()));
}
}
*/
public static List<VrfEntry> getVrfEntriesByOrigin(DataBroker broker, String rd,
List<RouteOrigin> originsToConsider) {
- List<VrfEntry> result = new ArrayList<VrfEntry>();
+ List<VrfEntry> result = new ArrayList<>();
List<VrfEntry> allVpnVrfEntries = getAllVrfEntries(broker, rd);
for (VrfEntry vrfEntry : allVpnVrfEntries) {
if (originsToConsider.contains(RouteOrigin.value(vrfEntry.getOrigin()))) {
if (vpnIds.isPresent()) {
return vpnIds.get().getPrefixes();
}
- return new ArrayList<Prefixes>();
+ return new ArrayList<>();
}
static List<Extraroute> getAllExtraRoutes(DataBroker broker, String vrfId) {
if (extraRoutes.isPresent()) {
return extraRoutes.get().getExtraroute();
}
- return new ArrayList<Extraroute>();
+ return new ArrayList<>();
}
/**
*/
public static List<VrfEntry> getAllVrfEntries(DataBroker broker, String rd) {
VrfTables vrfTables = VpnUtil.getVrfTable(broker, rd);
- return (vrfTables != null) ? vrfTables.getVrfEntry() : new ArrayList<VrfEntry>();
+ return (vrfTables != null) ? vrfTables.getVrfEntry() : new ArrayList<>();
}
//FIXME: Implement caches for DS reads
if (vpnInstanceOpDataOptional.isPresent()) {
return vpnInstanceOpDataOptional.get().getVpnInstanceOpDataEntry();
} else {
- return new ArrayList<VpnInstanceOpDataEntry>();
+ return new ArrayList<>();
}
}
InstanceIdentifier<Vpn> vpnExtraRoutesId =
InstanceIdentifier.builder(VpnToExtraroute.class).child(Vpn.class, new VpnKey(vpnRd)).build();
Optional<Vpn> vpnOpc = read(broker, LogicalDatastoreType.OPERATIONAL, vpnExtraRoutesId);
- return vpnOpc.isPresent() ? vpnOpc.get().getExtraroute() : new ArrayList<Extraroute>();
+ return vpnOpc.isPresent() ? vpnOpc.get().getExtraroute() : new ArrayList<>();
}
static Adjacencies getVpnInterfaceAugmentation(List<Adjacency> nextHopList) {
InstanceIdentifier<VrfTables> vpnVrfTableIid =
InstanceIdentifier.builder(FibEntries.class).child(VrfTables.class, new VrfTablesKey(rd)).build();
Optional<VrfTables> vrfTablesOpc = read(broker, LogicalDatastoreType.CONFIGURATION, vpnVrfTableIid);
- List<VrfEntry> matches = new ArrayList<VrfEntry>();
+ List<VrfEntry> matches = new ArrayList<>();
if (vrfTablesOpc.isPresent()) {
VrfTables vrfTables = vrfTablesOpc.get();
}
public static List<BigInteger> getDpnsOnVpn(DataBroker dataBroker, String vpnInstanceName) {
- List<BigInteger> result = new ArrayList<BigInteger>();
+ List<BigInteger> result = new ArrayList<>();
String rd = getVpnRd(dataBroker, vpnInstanceName);
if (rd == null) {
LOG.debug("Could not find Route-Distinguisher for VpnName={}", vpnInstanceName);
}
public static FlowEntity buildL3vpnGatewayFlow(BigInteger dpId, String gwMacAddress, long vpnId) {
- List<MatchInfo> mkMatches = new ArrayList<MatchInfo>();
+ List<MatchInfo> mkMatches = new ArrayList<>();
mkMatches.add(new MatchMetadata(MetaDataUtil.getVpnIdMetadata(vpnId), MetaDataUtil.METADATA_MASK_VRFID));
mkMatches.add(new MatchEthernetDestination(new MacAddress(gwMacAddress)));
- List<InstructionInfo> mkInstructions = new ArrayList<InstructionInfo>();
+ List<InstructionInfo> mkInstructions = new ArrayList<>();
mkInstructions.add(new InstructionGotoTable(NwConstants.L3_FIB_TABLE));
String flowId = getL3VpnGatewayFlowRef(NwConstants.L3_GW_MAC_TABLE, dpId, vpnId, gwMacAddress);
FlowEntity flowEntity = MDSALUtil.buildFlowEntity(dpId, NwConstants.L3_GW_MAC_TABLE,
public static List<MatchInfo> getMatchCriteria(final int lportTag,
final long vpnId, final String ipAddress) {
- final List<MatchInfo> matches = new ArrayList<MatchInfo>();
+ final List<MatchInfo> matches = new ArrayList<>();
short matchIndex = NwConstants.L3VPN_SERVICE_INDEX;
final BigInteger metadata = MetaDataUtil.getMetaDataForLPortDispatcher(
lportTag, ++matchIndex, MetaDataUtil.getVpnIdMetadata(vpnId));
public static List<Instruction> buildLportDispatcherTableInstructions(long vpnId) {
int instructionKey = 0;
- List<Instruction> instructions = new ArrayList<Instruction>();
+ List<Instruction> instructions = new ArrayList<>();
instructions.add(MDSALUtil.buildAndGetWriteMetadaInstruction(MetaDataUtil.getVpnIdMetadata(vpnId),
MetaDataUtil.METADATA_MASK_VRFID,
++instructionKey));
MDSALUtil.read(broker, LogicalDatastoreType.CONFIGURATION, interVpnLinkStateIid);
return (interVpnLinkStateOpData.isPresent()) ? interVpnLinkStateOpData.get().getInterVpnLinkState()
- : new ArrayList<InterVpnLinkState>();
+ : new ArrayList<>();
}
/**
}
} else {
LOG.trace("Could not find InterVpnLinkState for interVpnLink {}", vpnLinkName);
- return new ArrayList<BigInteger>();
+ return new ArrayList<>();
}
}
interVpnLink.getSecondEndpoint().getVpnUuid().getValue());
} else {
LOG.trace("Could not find an InterVpnLink with endpoint IpAddr={}", endpointIp);
- return new ArrayList<BigInteger>();
+ return new ArrayList<>();
}
}
InterVpnLinkState vpnLinkState = optVpnLinkState.get();
List<BigInteger> dpnIdList = destinationIs1stEndpoint ? vpnLinkState.getFirstEndpointState().getDpId()
: vpnLinkState.getSecondEndpointState().getDpId();
- List<String> nexthops = new ArrayList<String>();
+ List<String> nexthops = new ArrayList<>();
for (BigInteger dpnId : dpnIdList) {
nexthops.add(InterfaceUtils.getEndpointIpAddressForDPN(broker, dpnId));
}