@Service public class KeyStore extends Object implements KeyStoreService
Modifier and Type | Field and Description |
---|---|
protected CoordinationService |
coordService |
protected DistributedMap<Id<Key,String>,Key> |
keyMap |
protected SystemInformationService |
sysInfoService |
Modifier | Constructor and Description |
---|---|
|
KeyStore()
Construct KeyStoreManger
|
protected |
KeyStore(AbstractQuery<String,KeyEntity,Key,KeyFilter,EmptySortAttribute> query,
DataStoreService dataStoreService,
CoordinationService coordService,
SystemInformationService sysInfoService)
Unit test constructor
|
Modifier and Type | Method and Description |
---|---|
void |
activate() |
Key |
add(Key key)
Persist and team the key
|
void |
baseSystem(boolean baseSystem)
Used by KeySyncService to signal initialize from persist or team.
|
void |
deactivate() |
Long |
delete(KeyFilter filter)
Remove the identified key from team / persistence.
|
List<Key> |
find(KeyFilter filter)
Find the keys from persistence.
|
@Reference(cardinality=MANDATORY_UNARY, policy=DYNAMIC) protected volatile SystemInformationService sysInfoService
@Reference(cardinality=MANDATORY_UNARY, policy=DYNAMIC) protected volatile CoordinationService coordService
protected DistributedMap<Id<Key,String>,Key> keyMap
protected KeyStore(AbstractQuery<String,KeyEntity,Key,KeyFilter,EmptySortAttribute> query, DataStoreService dataStoreService, CoordinationService coordService, SystemInformationService sysInfoService)
query
- dao abstract querydataStoreService
- dao servicecoordService
- teaming servicesysInfoService
- sys info servicepublic KeyStore()
@Activate public void activate()
@Deactivate public void deactivate()
public void baseSystem(boolean baseSystem)
KeyStoreService
baseSystem
in interface KeyStoreService
baseSystem
- true to load from persist, false to load from teampublic Key add(Key key)
KeyStoreService
add
in interface KeyStoreService
key
- object to team and persistpublic Long delete(KeyFilter filter)
KeyStoreService
delete
in interface KeyStoreService
filter
- specifies type or individual keypublic List<Key> find(KeyFilter filter)
KeyStoreService
find
in interface KeyStoreService
filter
- criteria for findCopyright © 2015. All Rights Reserved.