public interface OvsdbClient
Modifier and Type | Method and Description |
---|---|
void |
cancelMonitor(MonitorHandle handler)
Cancels an existing monitor method.
|
void |
cancelMonitor(MonitorHandle handler,
int timeout)
Cancels an existing monitor method.
|
<T extends TypedBaseTable<?>> |
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.
|
<T extends TypedBaseTable<?>> |
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.
|
void |
disconnect() |
com.google.common.util.concurrent.ListenableFuture<List<String>> |
echo()
ovsdb echo operation.
|
OvsdbConnectionInfo |
getConnectionInfo() |
com.google.common.util.concurrent.ListenableFuture<List<String>> |
getDatabases()
Gets the list of database names exposed by this ovsdb capable device.
|
DatabaseSchema |
getDatabaseSchema(String dbName) |
com.google.common.util.concurrent.ListenableFuture<DatabaseSchema> |
getSchema(String database)
Asynchronously returns the schema object for a specific database.
|
<T extends TypedBaseTable<?>> |
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.
|
boolean |
isActive() |
boolean |
isConnectionPublished() |
void |
lock(String lockId,
LockAquisitionCallback lockedCallBack,
LockStolenCallback stolenCallback)
ovsdb lock operation.
|
<E extends TableSchema<E>> |
monitor(DatabaseSchema schema,
List<MonitorRequest> monitorRequests,
MonitorCallBack callback)
ovsdb monitor operation.
|
<E extends TableSchema<E>> |
monitor(DatabaseSchema schema,
List<MonitorRequest> monitorRequests,
MonitorCallBack callback,
int timeout)
ovsdb monitor operation.
|
<E extends TableSchema<E>> |
monitor(DatabaseSchema schema,
List<MonitorRequest> monitorRequests,
MonitorHandle monitorHandle,
MonitorCallBack callback)
ovsdb monitor operation.
|
<E extends TableSchema<E>> |
monitor(DatabaseSchema schema,
List<MonitorRequest> monitorRequests,
MonitorHandle monitorHandle,
MonitorCallBack callback,
int timeout)
ovsdb monitor operation.
|
void |
setConnectionPublished(boolean status) |
void |
startEchoService(EchoServiceCallbackFilters callbackFilters)
Starts the echo service.
|
com.google.common.util.concurrent.ListenableFuture<Boolean> |
steal(String lockId)
ovsdb steal operation.
|
void |
stopEchoService()
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.
|
TransactionBuilder |
transactBuilder(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.
|
com.google.common.util.concurrent.ListenableFuture<List<String>> getDatabases()
com.google.common.util.concurrent.ListenableFuture<DatabaseSchema> getSchema(String database)
database
- name of the database schemaTransactionBuilder transactBuilder(DatabaseSchema dbSchema)
com.google.common.util.concurrent.ListenableFuture<List<OperationResult>> transact(DatabaseSchema dbSchema, List<Operation> operations)
operations
- List of operations that needs to be part of a transact call<E extends TableSchema<E>> TableUpdates monitor(DatabaseSchema schema, List<MonitorRequest> monitorRequests, MonitorCallBack callback)
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<E extends TableSchema<E>> TableUpdates monitor(DatabaseSchema schema, List<MonitorRequest> monitorRequests, MonitorCallBack callback, int timeout)
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 responsetimeout
- time in seconds for monitor transaction timeout<E extends TableSchema<E>> TableUpdates monitor(DatabaseSchema schema, List<MonitorRequest> monitorRequests, MonitorHandle monitorHandle, MonitorCallBack callback)
monitorRequests
- represents what needs to be monitoredmonitorHandle
- A client specified monitor handle. This handle is used to later cancel
(cancelMonitor(MonitorHandle)
) the monitor.callback
- receives the monitor response<E extends TableSchema<E>> TableUpdates monitor(DatabaseSchema schema, List<MonitorRequest> monitorRequests, MonitorHandle monitorHandle, MonitorCallBack callback, int timeout)
monitorRequests
- represents what needs to be monitoredmonitorHandle
- A client specified monitor handle. This handle is used to later cancel
(cancelMonitor(MonitorHandle)
) the monitor.callback
- receives the monitor responsetimeout
- time in seconds for monitor transaction timeoutvoid cancelMonitor(MonitorHandle handler)
handler
- Handle identifying a specific monitor request that is being cancelled.IllegalStateException
- if there is no outstanding monitor request for this handlevoid cancelMonitor(MonitorHandle handler, int timeout)
handler
- Handle identifying a specific monitor request that is being cancelled.timeout
- time in seconds for monitor transaction timeoutIllegalStateException
- if there is no outstanding monitor request for this handlevoid lock(String lockId, LockAquisitionCallback lockedCallBack, LockStolenCallback stolenCallback)
lockId
- a client specified id for the lock; this can be used for unlocking (unLock(String)
)lockedCallBack
- Callback to nofify when the lock is acquiredstolenCallback
- Callback to notify when an acquired lock is stolen by another clientcom.google.common.util.concurrent.ListenableFuture<Boolean> steal(String lockId)
lock(String, LockAquisitionCallback, LockStolenCallback)
com.google.common.util.concurrent.ListenableFuture<Boolean> unLock(String lockId)
unLock(String)
void startEchoService(EchoServiceCallbackFilters callbackFilters)
callbackFilters
can be used to get notified on the absence of echo
notifications from the remote device and control the frequency of such notifications.callbackFilters
- callbacks for notifying the client of missing echo calls from remote.void stopEchoService()
OvsdbConnectionInfo getConnectionInfo()
boolean isActive()
void disconnect()
DatabaseSchema getDatabaseSchema(String dbName)
<T extends TypedBaseTable<?>> T createTypedRowWrapper(Class<T> klazz)
klazz
- Typed Interface<T extends TypedBaseTable<?>> T createTypedRowWrapper(DatabaseSchema dbSchema, Class<T> klazz)
dbSchema
- Database Schema of interestklazz
- Typed Interface<T extends TypedBaseTable<?>> T getTypedRowWrapper(Class<T> klazz, Row<GenericTableSchema> row)
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.boolean isConnectionPublished()
void setConnectionPublished(boolean status)
Copyright © 2018 OpenDaylight. All rights reserved.