2 * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.ovsdb.hwvtepsouthbound;
10 import org.opendaylight.ovsdb.hwvtepsouthbound.transactions.md.HwvtepOperationalCommandAggregator;
11 import org.opendaylight.ovsdb.hwvtepsouthbound.transactions.md.TransactionInvoker;
12 import org.opendaylight.ovsdb.lib.MonitorCallBack;
13 import org.opendaylight.ovsdb.lib.message.TableUpdates;
14 import org.opendaylight.ovsdb.lib.schema.DatabaseSchema;
15 import org.slf4j.Logger;
16 import org.slf4j.LoggerFactory;
18 public class HwvtepMonitorCallback implements MonitorCallBack {
20 private static final Logger LOG = LoggerFactory.getLogger(HwvtepMonitorCallback.class);
21 private HwvtepConnectionInstance key;
22 private TransactionInvoker txInvoker;
24 HwvtepMonitorCallback(HwvtepConnectionInstance key,TransactionInvoker txInvoker) {
25 this.txInvoker = txInvoker;
30 public void update(TableUpdates result, DatabaseSchema dbSchema) {
31 LOG.trace("result: {} dbSchema: {}",result,dbSchema.getName());
32 txInvoker.invoke(new HwvtepOperationalCommandAggregator(key, result, dbSchema));
33 LOG.trace("update exit");
37 public void exception(Throwable exception) {
38 LOG.warn("exception {}", exception);