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, store
protected static final long CHECK_LEASE_DELAY
public void onServiceStarted()
onServiceStarted
in class DistributedKVStoreService
public 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.IDistributedServiceRegistryService
typeName
- 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)
DistributedKVStoreService
storeLocal
in class DistributedKVStoreService
hash
- The hashkey
- The keyvalue
- The valuepublic jadex.commons.future.IFuture<java.util.Collection<jadex.bridge.service.types.dht.ServiceRegistration>> lookup(java.lang.String key)
DistributedKVStoreService
lookup
in interface jadex.bridge.service.types.dht.IDistributedKVStoreService
lookup
in interface jadex.bridge.service.types.dht.IDistributedServiceRegistryService
lookup
in class DistributedKVStoreService
key
- 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)
DistributedKVStoreService
lookup
in interface jadex.bridge.service.types.dht.IDistributedKVStoreService
lookup
in interface jadex.bridge.service.types.dht.IDistributedServiceRegistryService
lookup
in class DistributedKVStoreService
key
- Requested key.idHash
- The hashed key to find the corresponding node.protected jadex.commons.future.IFuture<java.lang.Void> checkValidity()