@Test public void writeDataReattemptTest() { doThrow(new IllegalStateException()).when(rwTx).put(LogicalDatastoreType.CONFIGURATION, nodeIid, node, true); final boolean result = GbpNetconfTransaction.netconfSyncedWrite(nodeIid, nodeIid, node, (byte) 5); verify(dataBroker, times(6)).newReadWriteTransaction(); assertFalse(result); }
public static <T extends DataObject> boolean netconfSyncedWrite(@Nonnull final InstanceIdentifier<Node> vppIid, @Nonnull final InstanceIdentifier<T> iid, @Nonnull final T data, byte retryCounter) { VbdNetconfTransaction.NODE_DATA_BROKER_MAP.get(vppIid).getValue().lock(); boolean result = write(VbdNetconfTransaction.NODE_DATA_BROKER_MAP.get(vppIid).getKey(), iid, data, retryCounter); VbdNetconfTransaction.NODE_DATA_BROKER_MAP.get(vppIid).getValue().unlock(); return result; }
GbpNetconfTransaction { public static <T extends DataObject> boolean netconfSyncedWrite(@Nonnull final InstanceIdentifier<Node> vppIid, @Nonnull final InstanceIdentifier<T> iid, @Nonnull final T data, byte retryCounter) { VbdNetconfTransaction.NODE_DATA_BROKER_MAP.get(vppIid).getValue().lock(); boolean result = write(VbdNetconfTransaction.NODE_DATA_BROKER_MAP.get(vppIid).getKey(), iid, data, retryCounter); VbdNetconfTransaction.NODE_DATA_BROKER_MAP.get(vppIid).getValue().unlock(); return result; } }
GbpNetconfTransaction { public static <T extends DataObject> boolean netconfSyncedWrite(@Nonnull final InstanceIdentifier<Node> vppIid, @Nonnull final InstanceIdentifier<T> iid, @Nonnull final T data, byte retryCounter) { VbdNetconfTransaction.NODE_DATA_BROKER_MAP.get(vppIid).getValue().lock(); boolean result = write(VbdNetconfTransaction.NODE_DATA_BROKER_MAP.get(vppIid).getKey(), iid, data, retryCounter); VbdNetconfTransaction.NODE_DATA_BROKER_MAP.get(vppIid).getValue().unlock(); return result; }  }
GbpNetconfTransaction { public static <T extends DataObject> boolean netconfSyncedWrite(@Nonnull final InstanceIdentifier<Node> vppIid, @Nonnull final InstanceIdentifier<T> iid, @Nonnull final T data, byte retryCounter) { VbdNetconfTransaction.NODE_DATA_BROKER_MAP.get(vppIid).getValue().lock(); boolean result = write(VbdNetconfTransaction.NODE_DATA_BROKER_MAP.get(vppIid).getKey(), iid, data, retryCounter); VbdNetconfTransaction.NODE_DATA_BROKER_MAP.get(vppIid).getValue().unlock(); return result; }  static boolean netconfSyncedWrite(@Nonnull final InstanceIdentifier<Node> vppIid,
        @Nonnull final InstanceIdentifier<T> iid, @Nonnull final T data, byte retryCounter); static boolean netconfSyncedWrite(@Nonnull final InstanceIdentifier<Node> vppIid,
            @Nonnull final Map<InstanceIdentifier<T>,T> data, byte retryCounter); static boolean netconfSyncedMerge(@Nonnull final InstanceIdentifier<Node> vppIid,
        @Nonnull final InstanceIdentifier<T> iid, @Nonnull final T data, byte retryCounter); static boolean netconfSyncedMerge(@Nonnull final InstanceIdentifier<Node> vppIid,
        @Nonnull final ConfigCommand command, byte retryCounter); static boolean netconfSyncedWrite(@Nonnull final InstanceIdentifier<Node> vppIid,
        @Nonnull final ConfigCommand command, byte retryCounter); static boolean netconfSyncedWrite(@Nonnull final InstanceIdentifier<Node> vppIid,
        @Nonnull final RoutingCommand command, byte retryCounter); static boolean netconfSyncedDelete(@Nonnull final InstanceIdentifier<Node> vppIid,
        @Nonnull final InstanceIdentifier<T> iid, byte retryCounter); static boolean netconfSyncedDelete(@Nonnull final InstanceIdentifier<Node> vppIid,
            @Nonnull Set<InstanceIdentifier<T>> iids , byte retryCounter); static boolean netconfSyncedDelete(@Nonnull final InstanceIdentifier<Node> vppIid,
        @Nonnull final ConfigCommand command, byte retryCounter); static boolean netconfSyncedDelete(@Nonnull final InstanceIdentifier<Node> vppIid,
        @Nonnull final RoutingCommand command, byte retryCounter); static synchronized Optional<T> read(final InstanceIdentifier<Node> vppIid,
        final LogicalDatastoreType datastoreType, final InstanceIdentifier<T> iid, byte retryCounter); }
GbpNetconfTransaction { public static <T extends DataObject> boolean netconfSyncedWrite(@Nonnull final InstanceIdentifier<Node> vppIid, @Nonnull final InstanceIdentifier<T> iid, @Nonnull final T data, byte retryCounter) { VbdNetconfTransaction.NODE_DATA_BROKER_MAP.get(vppIid).getValue().lock(); boolean result = write(VbdNetconfTransaction.NODE_DATA_BROKER_MAP.get(vppIid).getKey(), iid, data, retryCounter); VbdNetconfTransaction.NODE_DATA_BROKER_MAP.get(vppIid).getValue().unlock(); return result; }  static boolean netconfSyncedWrite(@Nonnull final InstanceIdentifier<Node> vppIid,
        @Nonnull final InstanceIdentifier<T> iid, @Nonnull final T data, byte retryCounter); static boolean netconfSyncedWrite(@Nonnull final InstanceIdentifier<Node> vppIid,
            @Nonnull final Map<InstanceIdentifier<T>,T> data, byte retryCounter); static boolean netconfSyncedMerge(@Nonnull final InstanceIdentifier<Node> vppIid,
        @Nonnull final InstanceIdentifier<T> iid, @Nonnull final T data, byte retryCounter); static boolean netconfSyncedMerge(@Nonnull final InstanceIdentifier<Node> vppIid,
        @Nonnull final ConfigCommand command, byte retryCounter); static boolean netconfSyncedWrite(@Nonnull final InstanceIdentifier<Node> vppIid,
        @Nonnull final ConfigCommand command, byte retryCounter); static boolean netconfSyncedWrite(@Nonnull final InstanceIdentifier<Node> vppIid,
        @Nonnull final RoutingCommand command, byte retryCounter); static boolean netconfSyncedDelete(@Nonnull final InstanceIdentifier<Node> vppIid,
        @Nonnull final InstanceIdentifier<T> iid, byte retryCounter); static boolean netconfSyncedDelete(@Nonnull final InstanceIdentifier<Node> vppIid,
            @Nonnull Set<InstanceIdentifier<T>> iids , byte retryCounter); static boolean netconfSyncedDelete(@Nonnull final InstanceIdentifier<Node> vppIid,
        @Nonnull final ConfigCommand command, byte retryCounter); static boolean netconfSyncedDelete(@Nonnull final InstanceIdentifier<Node> vppIid,
        @Nonnull final RoutingCommand command, byte retryCounter); static synchronized Optional<T> read(final InstanceIdentifier<Node> vppIid,
        final LogicalDatastoreType datastoreType, final InstanceIdentifier<T> iid, byte retryCounter); static final byte RETRY_COUNT; }