Class RedisBackendService
- java.lang.Object
-
- io.vertx.servicediscovery.backend.redis.RedisBackendService
-
- All Implemented Interfaces:
ServiceDiscoveryBackend
public class RedisBackendService extends Object implements ServiceDiscoveryBackend
An implementation of the discovery backend based on Redis.- Author:
- Clement Escoffier
-
-
Constructor Summary
Constructors Constructor Description RedisBackendService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidgetRecord(String uuid, Handler<AsyncResult<Record>> resultHandler)Get the record with the given uuid.voidgetRecords(Handler<AsyncResult<List<Record>>> resultHandler)Gets all the recordsvoidinit(Vertx vertx, JsonObject configuration)Initializes the backend.voidremove(Record record, Handler<AsyncResult<Record>> resultHandler)Removes a record.voidremove(String uuid, Handler<AsyncResult<Record>> resultHandler)Removes a records based on its UUID.voidstore(Record record, Handler<AsyncResult<Record>> resultHandler)Stores a record.voidupdate(Record record, Handler<AsyncResult<Void>> resultHandler)Updates a record-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.vertx.servicediscovery.spi.ServiceDiscoveryBackend
name
-
-
-
-
Method Detail
-
init
public void init(Vertx vertx, JsonObject configuration)
Description copied from interface:ServiceDiscoveryBackendInitializes the backend.- Specified by:
initin interfaceServiceDiscoveryBackend- Parameters:
vertx- the vert.x instanceconfiguration- the configuration if any.
-
store
public void store(Record record, Handler<AsyncResult<Record>> resultHandler)
Description copied from interface:ServiceDiscoveryBackendStores a record.- Specified by:
storein interfaceServiceDiscoveryBackend- Parameters:
record- the recordresultHandler- the completion handler
-
remove
public void remove(Record record, Handler<AsyncResult<Record>> resultHandler)
Description copied from interface:ServiceDiscoveryBackendRemoves a record.- Specified by:
removein interfaceServiceDiscoveryBackend- Parameters:
record- the recordresultHandler- the completion handler
-
remove
public void remove(String uuid, Handler<AsyncResult<Record>> resultHandler)
Description copied from interface:ServiceDiscoveryBackendRemoves a records based on its UUID.- Specified by:
removein interfaceServiceDiscoveryBackend- Parameters:
uuid- the uuid / registration idresultHandler- the completion handler
-
update
public void update(Record record, Handler<AsyncResult<Void>> resultHandler)
Description copied from interface:ServiceDiscoveryBackendUpdates a record- Specified by:
updatein interfaceServiceDiscoveryBackend- Parameters:
record- the record to updateresultHandler- the completion handler
-
getRecords
public void getRecords(Handler<AsyncResult<List<Record>>> resultHandler)
Description copied from interface:ServiceDiscoveryBackendGets all the records- Specified by:
getRecordsin interfaceServiceDiscoveryBackend- Parameters:
resultHandler- the result handler
-
getRecord
public void getRecord(String uuid, Handler<AsyncResult<Record>> resultHandler)
Description copied from interface:ServiceDiscoveryBackendGet the record with the given uuid.- Specified by:
getRecordin interfaceServiceDiscoveryBackend- Parameters:
uuid- the uuid / registration idresultHandler- the result handler
-
-