Package org.opendaylight.ovsdb.lib.impl
Class OvsdbClientImpl
java.lang.Object
org.opendaylight.ovsdb.lib.impl.OvsdbClientImpl
- All Implemented Interfaces:
 OvsdbClient
- 
Constructor Summary
ConstructorsConstructorDescriptionOvsdbClientImpl(OvsdbRPC rpc, io.netty.channel.Channel channel, OvsdbConnectionInfo.ConnectionType type, OvsdbConnectionInfo.SocketConnectionType socketConnType)  - 
Method Summary
Modifier and TypeMethodDescriptionvoidcancelMonitor(MonitorHandle handler) Cancels an existing monitor method.voidcancelMonitor(MonitorHandle handler, int timeout) Cancels an existing monitor method.<T extends TypedBaseTable<?>>
TcreateTypedRowWrapper(Class<T> klazz) User friendly convenient method that make use of TyperUtils.getTypedRowWrapper to create a Typed Row Proxy given the Typed Table Class.<T extends TypedBaseTable<?>>
TcreateTypedRowWrapper(DatabaseSchema dbSchema, Class<T> klazz) User friendly convenient method that make use of getTypedRowWrapper to create a Typed Row Proxy given DatabaseSchema and Typed Table Class.voidecho()ovsdb echo operation.Gets the list of database names exposed by this ovsdb capable device.getDatabaseSchema(String dbName) com.google.common.util.concurrent.ListenableFuture<TypedDatabaseSchema> Asynchronously returns the schema object for a specific database.<T extends TypedBaseTable<?>>
TgetTypedRowWrapper(Class<T> klazz, Row<GenericTableSchema> row) User friendly convenient method to get a Typed Row Proxy given a Typed Table Class and the Row to be wrapped.booleanisActive()booleanbooleanisReady(int timeout) voidlock(String lockId, LockAquisitionCallback lockedCallBack, LockStolenCallback stolenCallback) ovsdb lock operation.<E extends TableSchema<E>>
TableUpdatesmonitor(DatabaseSchema dbSchema, List<MonitorRequest> monitorRequest, MonitorCallBack callback) ovsdb monitor operation.<E extends TableSchema<E>>
TableUpdatesmonitor(DatabaseSchema dbSchema, List<MonitorRequest> monitorRequest, MonitorCallBack callback, int timeout) ovsdb monitor operation.<E extends TableSchema<E>>
TableUpdatesmonitor(DatabaseSchema dbSchema, List<MonitorRequest> monitorRequest, MonitorHandle monitorHandle, MonitorCallBack callback) ovsdb monitor operation.<E extends TableSchema<E>>
TableUpdatesmonitor(DatabaseSchema dbSchema, List<MonitorRequest> monitorRequest, MonitorHandle monitorHandle, MonitorCallBack callback, int timeout) ovsdb monitor operation.voidsetConnectionPublished(boolean connectionPublished) voidvoidstartEchoService(EchoServiceCallbackFilters callbackFilters) Starts the echo service.com.google.common.util.concurrent.ListenableFuture<Boolean> ovsdb steal operation.voidStops the echo service, i.e echo requests from the remote would not be acknowledged after this call.com.google.common.util.concurrent.ListenableFuture<List<OperationResult>> transact(DatabaseSchema dbSchema, List<Operation> operations) Execute the list of operations in a single Transactions.transactBuilder(DatabaseSchema dbSchema) Allows for a mini DSL way of collecting the transactions to be executed against the ovsdb instance.protected TableUpdatestransformingCallback(com.fasterxml.jackson.databind.JsonNode tableUpdatesJson, DatabaseSchema dbSchema) com.google.common.util.concurrent.ListenableFuture<Boolean> ovsdb unlock operation. 
- 
Constructor Details
- 
OvsdbClientImpl
public OvsdbClientImpl(OvsdbRPC rpc, io.netty.channel.Channel channel, OvsdbConnectionInfo.ConnectionType type, OvsdbConnectionInfo.SocketConnectionType socketConnType)  
 - 
 - 
Method Details
- 
transformingCallback
protected TableUpdates transformingCallback(com.fasterxml.jackson.databind.JsonNode tableUpdatesJson, DatabaseSchema dbSchema)  - 
transact
public com.google.common.util.concurrent.ListenableFuture<List<OperationResult>> transact(DatabaseSchema dbSchema, List<Operation> operations) Description copied from interface:OvsdbClientExecute the list of operations in a single Transactions. Similar to the transactBuilder() method- Specified by:
 transactin interfaceOvsdbClient- Parameters:
 operations- List of operations that needs to be part of a transact call- Returns:
 - Future object representing the result of the transaction. Calling cancel on the Future would cause OVSDB cancel operation to be fired against the device.
 
 - 
monitor
public <E extends TableSchema<E>> TableUpdates monitor(DatabaseSchema dbSchema, List<MonitorRequest> monitorRequest, MonitorCallBack callback) Description copied from interface:OvsdbClientovsdb monitor operation.- Specified by:
 monitorin interfaceOvsdbClient- Parameters:
 monitorRequest- represents what needs to be monitored including a client specified monitor handle. This handle is used to later cancel (OvsdbClient.cancelMonitor(MonitorHandle)) the monitor.callback- receives the monitor response
 - 
monitor
public <E extends TableSchema<E>> TableUpdates monitor(DatabaseSchema dbSchema, List<MonitorRequest> monitorRequest, MonitorCallBack callback, int timeout) Description copied from interface:OvsdbClientovsdb monitor operation.- Specified by:
 monitorin interfaceOvsdbClient- Parameters:
 monitorRequest- represents what needs to be monitored including a client specified monitor handle. This handle is used to later cancel (OvsdbClient.cancelMonitor(MonitorHandle)) the monitor.callback- receives the monitor responsetimeout- time in seconds for monitor transaction timeout
 - 
monitor
public <E extends TableSchema<E>> TableUpdates monitor(DatabaseSchema dbSchema, List<MonitorRequest> monitorRequest, MonitorHandle monitorHandle, MonitorCallBack callback) Description copied from interface:OvsdbClientovsdb monitor operation.- Specified by:
 monitorin interfaceOvsdbClient- Parameters:
 monitorRequest- represents what needs to be monitoredmonitorHandle- A client specified monitor handle. This handle is used to later cancel (OvsdbClient.cancelMonitor(MonitorHandle)) the monitor.callback- receives the monitor response
 - 
monitor
public <E extends TableSchema<E>> TableUpdates monitor(DatabaseSchema dbSchema, List<MonitorRequest> monitorRequest, MonitorHandle monitorHandle, MonitorCallBack callback, int timeout) Description copied from interface:OvsdbClientovsdb monitor operation.- Specified by:
 monitorin interfaceOvsdbClient- Parameters:
 monitorRequest- represents what needs to be monitoredmonitorHandle- A client specified monitor handle. This handle is used to later cancel (OvsdbClient.cancelMonitor(MonitorHandle)) the monitor.callback- receives the monitor responsetimeout- time in seconds for monitor transaction timeout
 - 
cancelMonitor
Description copied from interface:OvsdbClientCancels an existing monitor method.- Specified by:
 cancelMonitorin interfaceOvsdbClient- Parameters:
 handler- Handle identifying a specific monitor request that is being cancelled.
 - 
cancelMonitor
Description copied from interface:OvsdbClientCancels an existing monitor method.- Specified by:
 cancelMonitorin interfaceOvsdbClient- Parameters:
 handler- Handle identifying a specific monitor request that is being cancelled.timeout- time in seconds for monitor transaction timeout
 - 
echo
Description copied from interface:OvsdbClientovsdb echo operation.- Specified by:
 echoin interfaceOvsdbClient
 - 
lock
public void lock(String lockId, LockAquisitionCallback lockedCallBack, LockStolenCallback stolenCallback) Description copied from interface:OvsdbClientovsdb lock operation.- Specified by:
 lockin interfaceOvsdbClient- Parameters:
 lockId- a client specified id for the lock; this can be used for unlocking (OvsdbClient.unLock(String))lockedCallBack- Callback to nofify when the lock is acquiredstolenCallback- Callback to notify when an acquired lock is stolen by another client
 - 
steal
Description copied from interface:OvsdbClientovsdb steal operation. SeeOvsdbClient.lock(String, LockAquisitionCallback, LockStolenCallback)- Specified by:
 stealin interfaceOvsdbClient
 - 
unLock
Description copied from interface:OvsdbClientovsdb unlock operation. SeeOvsdbClient.unLock(String)- Specified by:
 unLockin interfaceOvsdbClient
 - 
startEchoService
Description copied from interface:OvsdbClientStarts the echo service. ThecallbackFilterscan be used to get notified on the absence of echo notifications from the remote device and control the frequency of such notifications.- Specified by:
 startEchoServicein interfaceOvsdbClient- Parameters:
 callbackFilters- callbacks for notifying the client of missing echo calls from remote.
 - 
stopEchoService
public void stopEchoService()Description copied from interface:OvsdbClientStops the echo service, i.e echo requests from the remote would not be acknowledged after this call.- Specified by:
 stopEchoServicein interfaceOvsdbClient
 - 
transactBuilder
Description copied from interface:OvsdbClientAllows for a mini DSL way of collecting the transactions to be executed against the ovsdb instance.- Specified by:
 transactBuilderin interfaceOvsdbClient- Returns:
 - TransactionBuilder
 
 - 
isReady
- Throws:
 InterruptedException
 - 
getDatabases
Description copied from interface:OvsdbClientGets the list of database names exposed by this ovsdb capable device.- Specified by:
 getDatabasesin interfaceOvsdbClient- Returns:
 - list of database names
 
 - 
getSchema
public com.google.common.util.concurrent.ListenableFuture<TypedDatabaseSchema> getSchema(String database) Description copied from interface:OvsdbClientAsynchronously returns the schema object for a specific database.- Specified by:
 getSchemain interfaceOvsdbClient- Parameters:
 database- name of the database schema- Returns:
 - DatabaseSchema future
 
 - 
setRpc
 - 
getDatabaseSchema
- Specified by:
 getDatabaseSchemain interfaceOvsdbClient
 - 
createTypedRowWrapper
User friendly convenient method that make use of TyperUtils.getTypedRowWrapper to create a Typed Row Proxy given the Typed Table Class.- Specified by:
 createTypedRowWrapperin interfaceOvsdbClient- Parameters:
 klazz- Typed Interface- Returns:
 - Proxy wrapper for the actual raw Row class.
 
 - 
createTypedRowWrapper
public <T extends TypedBaseTable<?>> T createTypedRowWrapper(DatabaseSchema dbSchema, Class<T> klazz) User friendly convenient method that make use of getTypedRowWrapper to create a Typed Row Proxy given DatabaseSchema and Typed Table Class.- Specified by:
 createTypedRowWrapperin interfaceOvsdbClient- Parameters:
 dbSchema- Database Schema of interestklazz- Typed Interface- Returns:
 - Proxy wrapper for the actual raw Row class.
 
 - 
getTypedRowWrapper
public <T extends TypedBaseTable<?>> T getTypedRowWrapper(Class<T> klazz, Row<GenericTableSchema> row) User friendly convenient method to get a Typed Row Proxy given a Typed Table Class and the Row to be wrapped.- Specified by:
 getTypedRowWrapperin interfaceOvsdbClient- Parameters:
 klazz- Typed Interfacerow- The actual Row that the wrapper is operating on. It can be null if the caller is just interested in getting ColumnSchema.- Returns:
 - Proxy wrapper for the actual raw Row class.
 
 - 
getConnectionInfo
- Specified by:
 getConnectionInfoin interfaceOvsdbClient
 - 
isActive
public boolean isActive()- Specified by:
 isActivein interfaceOvsdbClient
 - 
disconnect
public void disconnect()- Specified by:
 disconnectin interfaceOvsdbClient
 - 
isConnectionPublished
public boolean isConnectionPublished()- Specified by:
 isConnectionPublishedin interfaceOvsdbClient
 - 
setConnectionPublished
public void setConnectionPublished(boolean connectionPublished) - Specified by:
 setConnectionPublishedin interfaceOvsdbClient
 
 -