Package org.opendaylight.ovsdb.lib
Interface OvsdbClient
- 
- All Known Implementing Classes:
- OvsdbClientImpl
 
 public interface OvsdbClientThe main interface to interact with a device speaking ovsdb protocol in an asynchronous fashion and hence most operations return a Future object representing the eventual response data from the remote.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcancelMonitor(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 methods 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 methods that make use of getTypedRowWrapper to create a Typed Row Proxy given DatabaseSchema and Typed Table Class.voiddisconnect()com.google.common.util.concurrent.ListenableFuture<List<String>>echo()ovsdb echo operation.OvsdbConnectionInfogetConnectionInfo()com.google.common.util.concurrent.ListenableFuture<List<String>>getDatabases()Gets the list of database names exposed by this ovsdb capable device.TypedDatabaseSchemagetDatabaseSchema(String dbName)com.google.common.util.concurrent.ListenableFuture<TypedDatabaseSchema>getSchema(String database)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()booleanisConnectionPublished()voidlock(String lockId, LockAquisitionCallback lockedCallBack, LockStolenCallback stolenCallback)ovsdb lock operation.<E extends TableSchema<E>>
 TableUpdatesmonitor(DatabaseSchema schema, List<MonitorRequest> monitorRequests, MonitorCallBack callback)ovsdb monitor operation.<E extends TableSchema<E>>
 TableUpdatesmonitor(DatabaseSchema schema, List<MonitorRequest> monitorRequests, MonitorCallBack callback, int timeout)ovsdb monitor operation.<E extends TableSchema<E>>
 TableUpdatesmonitor(DatabaseSchema schema, List<MonitorRequest> monitorRequests, MonitorHandle monitorHandle, MonitorCallBack callback)ovsdb monitor operation.<E extends TableSchema<E>>
 TableUpdatesmonitor(DatabaseSchema schema, List<MonitorRequest> monitorRequests, MonitorHandle monitorHandle, MonitorCallBack callback, int timeout)ovsdb monitor operation.voidsetConnectionPublished(boolean status)voidstartEchoService(EchoServiceCallbackFilters callbackFilters)Starts the echo service.com.google.common.util.concurrent.ListenableFuture<Boolean>steal(String lockId)ovsdb steal operation.voidstopEchoService()Stops 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.TransactionBuildertransactBuilder(DatabaseSchema dbSchema)Allows for a mini DSL way of collecting the transactions to be executed against the ovsdb instance.com.google.common.util.concurrent.ListenableFuture<Boolean>unLock(String lockId)ovsdb unlock operation.
 
- 
- 
- 
Method Detail- 
getDatabasescom.google.common.util.concurrent.ListenableFuture<List<String>> getDatabases() Gets the list of database names exposed by this ovsdb capable device.- Returns:
- list of database names
 
 - 
getSchemacom.google.common.util.concurrent.ListenableFuture<TypedDatabaseSchema> getSchema(String database) Asynchronously returns the schema object for a specific database.- Parameters:
- database- name of the database schema
- Returns:
- DatabaseSchema future
 
 - 
transactBuilderTransactionBuilder transactBuilder(DatabaseSchema dbSchema) Allows for a mini DSL way of collecting the transactions to be executed against the ovsdb instance.- Returns:
- TransactionBuilder
 
 - 
transactcom.google.common.util.concurrent.ListenableFuture<List<OperationResult>> transact(DatabaseSchema dbSchema, List<Operation> operations) Execute the list of operations in a single Transactions. Similar to the transactBuilder() method- 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<E extends TableSchema<E>> TableUpdates monitor(DatabaseSchema schema, List<MonitorRequest> monitorRequests, MonitorCallBack callback) ovsdb monitor operation.- Parameters:
- monitorRequests- represents what needs to be monitored including a client specified monitor handle. This handle is used to later cancel (- cancelMonitor(MonitorHandle)) the monitor.
- callback- receives the monitor response
 
 - 
monitor<E extends TableSchema<E>> TableUpdates monitor(DatabaseSchema schema, List<MonitorRequest> monitorRequests, MonitorCallBack callback, int timeout) ovsdb monitor operation.- Parameters:
- monitorRequests- represents what needs to be monitored including a client specified monitor handle. This handle is used to later cancel (- cancelMonitor(MonitorHandle)) the monitor.
- callback- receives the monitor response
- timeout- time in seconds for monitor transaction timeout
 
 - 
monitor<E extends TableSchema<E>> TableUpdates monitor(DatabaseSchema schema, List<MonitorRequest> monitorRequests, MonitorHandle monitorHandle, MonitorCallBack callback) ovsdb monitor operation.- Parameters:
- monitorRequests- represents what needs to be monitored
- monitorHandle- A client specified monitor handle. This handle is used to later cancel (- cancelMonitor(MonitorHandle)) the monitor.
- callback- receives the monitor response
 
 - 
monitor<E extends TableSchema<E>> TableUpdates monitor(DatabaseSchema schema, List<MonitorRequest> monitorRequests, MonitorHandle monitorHandle, MonitorCallBack callback, int timeout) ovsdb monitor operation.- Parameters:
- monitorRequests- represents what needs to be monitored
- monitorHandle- A client specified monitor handle. This handle is used to later cancel (- cancelMonitor(MonitorHandle)) the monitor.
- callback- receives the monitor response
- timeout- time in seconds for monitor transaction timeout
 
 - 
cancelMonitorvoid cancelMonitor(MonitorHandle handler) Cancels an existing monitor method.- Parameters:
- handler- Handle identifying a specific monitor request that is being cancelled.
- Throws:
- IllegalStateException- if there is no outstanding monitor request for this handle
 
 - 
cancelMonitorvoid cancelMonitor(MonitorHandle handler, int timeout) Cancels an existing monitor method.- Parameters:
- handler- Handle identifying a specific monitor request that is being cancelled.
- timeout- time in seconds for monitor transaction timeout
- Throws:
- IllegalStateException- if there is no outstanding monitor request for this handle
 
 - 
lockvoid lock(String lockId, LockAquisitionCallback lockedCallBack, LockStolenCallback stolenCallback) ovsdb lock operation.- Parameters:
- lockId- a client specified id for the lock; this can be used for unlocking (- unLock(String))
- lockedCallBack- Callback to nofify when the lock is acquired
- stolenCallback- Callback to notify when an acquired lock is stolen by another client
 
 - 
stealcom.google.common.util.concurrent.ListenableFuture<Boolean> steal(String lockId) ovsdb steal operation. Seelock(String, LockAquisitionCallback, LockStolenCallback)
 - 
unLockcom.google.common.util.concurrent.ListenableFuture<Boolean> unLock(String lockId) ovsdb unlock operation. SeeunLock(String)
 - 
startEchoServicevoid startEchoService(EchoServiceCallbackFilters callbackFilters) Starts 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.- Parameters:
- callbackFilters- callbacks for notifying the client of missing echo calls from remote.
 
 - 
stopEchoServicevoid stopEchoService() Stops the echo service, i.e echo requests from the remote would not be acknowledged after this call.
 - 
getConnectionInfoOvsdbConnectionInfo getConnectionInfo() 
 - 
isActiveboolean isActive() 
 - 
disconnectvoid disconnect() 
 - 
getDatabaseSchemaTypedDatabaseSchema getDatabaseSchema(String dbName) 
 - 
createTypedRowWrapper<T extends TypedBaseTable<?>> T createTypedRowWrapper(Class<T> klazz) User friendly convenient methods that make use of TyperUtils.getTypedRowWrapper to create a Typed Row Proxy given the Typed Table Class.- Parameters:
- klazz- Typed Interface
- Returns:
- Proxy wrapper for the actual raw Row class.
 
 - 
createTypedRowWrapper<T extends TypedBaseTable<?>> T createTypedRowWrapper(DatabaseSchema dbSchema, Class<T> klazz) User friendly convenient methods that make use of getTypedRowWrapper to create a Typed Row Proxy given DatabaseSchema and Typed Table Class.- Parameters:
- dbSchema- Database Schema of interest
- klazz- Typed Interface
- Returns:
- Proxy wrapper for the actual raw Row class.
 
 - 
getTypedRowWrapper<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.- Parameters:
- klazz- Typed Interface
- row- 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.
 
 - 
isConnectionPublishedboolean isConnectionPublished() 
 - 
setConnectionPublishedvoid setConnectionPublished(boolean status) 
 
- 
 
-