public class DistributedServiceRegistryService extends DistributedKVStoreService implements jadex.bridge.service.types.dht.IDistributedServiceRegistryService
| Modifier and Type | Field and Description |
|---|---|
protected static long |
CHECK_LEASE_DELAY
Delay in ms between two stabilize runs
|
agent, CHECK_STORED_DATA_DELAY, checkDataStep, executor, initialized, keyMap, logger, myId, ring| Constructor and Description |
|---|
DistributedServiceRegistryService() |
| Modifier and Type | Method and Description |
|---|---|
protected jadex.commons.future.IFuture<java.lang.Void> |
checkValidity()
Check the validity of all entries and remove them, if invalid.
|
jadex.commons.future.IFuture<java.util.Collection<jadex.bridge.service.types.dht.ServiceRegistration>> |
lookup(java.lang.String key)
Lookup a key in the ring and return the saved value, if any.
|
jadex.commons.future.IFuture<java.util.Collection<jadex.bridge.service.types.dht.ServiceRegistration>> |
lookup(java.lang.String key,
jadex.bridge.service.types.dht.IID idHash)
Lookup a key in the ring and return the saved value, if any.
|
void |
onServiceStarted() |
jadex.commons.future.IFuture<java.lang.Void> |
publish(java.lang.String typeName,
jadex.bridge.service.IServiceIdentifier serviceIdentifier)
Publish a service in the distributed registry.
|
protected jadex.commons.future.IFuture<jadex.bridge.service.types.dht.IID> |
storeLocal(jadex.bridge.service.types.dht.IID hash,
java.lang.String key,
java.lang.Object value,
boolean addToCollection)
Store a key/value pair in the local map.
|
add, checkData, disableSchedules, eventReceived, getLocalKeySet, getStoreService, isInitialized, log, lookupResponsibleStore, pullEntries, pushEntries, put, setInitialized, setRingService, store, storeprotected static final long CHECK_LEASE_DELAY
public void onServiceStarted()
onServiceStarted in class DistributedKVStoreServicepublic jadex.commons.future.IFuture<java.lang.Void> publish(java.lang.String typeName,
jadex.bridge.service.IServiceIdentifier serviceIdentifier)
publish in interface jadex.bridge.service.types.dht.IDistributedServiceRegistryServicetypeName - Type of the service (fully-qualified)serviceIdentifier - SID of the serviceprotected jadex.commons.future.IFuture<jadex.bridge.service.types.dht.IID> storeLocal(jadex.bridge.service.types.dht.IID hash,
java.lang.String key,
java.lang.Object value,
boolean addToCollection)
DistributedKVStoreServicestoreLocal in class DistributedKVStoreServicehash - The hashkey - The keyvalue - The valuepublic jadex.commons.future.IFuture<java.util.Collection<jadex.bridge.service.types.dht.ServiceRegistration>> lookup(java.lang.String key)
DistributedKVStoreServicelookup in interface jadex.bridge.service.types.dht.IDistributedKVStoreServicelookup in interface jadex.bridge.service.types.dht.IDistributedServiceRegistryServicelookup in class DistributedKVStoreServicekey - Requested key.public jadex.commons.future.IFuture<java.util.Collection<jadex.bridge.service.types.dht.ServiceRegistration>> lookup(java.lang.String key,
jadex.bridge.service.types.dht.IID idHash)
DistributedKVStoreServicelookup in interface jadex.bridge.service.types.dht.IDistributedKVStoreServicelookup in interface jadex.bridge.service.types.dht.IDistributedServiceRegistryServicelookup in class DistributedKVStoreServicekey - Requested key.idHash - The hashed key to find the corresponding node.protected jadex.commons.future.IFuture<java.lang.Void> checkValidity()