Package org.onosproject.store.app
Class DistributedApplicationStore
- java.lang.Object
- 
- org.onosproject.store.AbstractStore<ApplicationEvent,ApplicationStoreDelegate>
- 
- org.onosproject.common.app.ApplicationArchive
- 
- org.onosproject.store.app.DistributedApplicationStore
 
 
 
- 
- All Implemented Interfaces:
- ApplicationStore,- Store<ApplicationEvent,ApplicationStoreDelegate>
 
 public class DistributedApplicationStore extends ApplicationArchive implements ApplicationStore Manages inventory of applications in a distributed data store providing stronger consistency guarantees.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classDistributedApplicationStore.InternalState
 - 
Field SummaryFields Modifier and Type Field Description protected ClusterCommunicationServiceclusterCommunicatorprotected ClusterServiceclusterServiceprotected ApplicationIdStoreidStoreprotected StorageServicestorageServiceprotected VersionServiceversionService- 
Fields inherited from class org.onosproject.store.AbstractStoredelegate
 
- 
 - 
Constructor SummaryConstructors Constructor Description DistributedApplicationStore()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivate()voidactivate(ApplicationId appId)Mark the application as active.Applicationcreate(java.io.InputStream appDescStream)Creates the application from the specified application descriptor input stream.voiddeactivate()voiddeactivate(ApplicationId appId)Mark the application as deactivated.ApplicationgetApplication(ApplicationId appId)Returns the application with the supplied application identifier.java.io.InputStreamgetApplicationArchive(ApplicationId appId)Returns stream that contains the application OAR/JAR file contents.java.util.Set<Application>getApplications()Returns the set of all installed applications.ApplicationIdgetId(java.lang.String name)Returns the registered id of the application with the given name.java.util.Set<Permission>getPermissions(ApplicationId appId)Returns the permissions granted to the applications.ApplicationStategetState(ApplicationId appId)Returns the current application state.voidremove(ApplicationId appId)Removes the specified application.voidsetDelegate(ApplicationStoreDelegate delegate)Sets the delegate on the store.voidsetPermissions(ApplicationId appId, java.util.Set<Permission> permissions)Updates the permissions granted to the applications.- 
Methods inherited from class org.onosproject.common.app.ApplicationArchiveclearActive, getApplicationDescription, getApplicationInputStream, getApplicationNames, getRole, getRootPath, getUpdateTime, isActive, purgeApplication, saveApplication, setActive, setRootPath, updateTime
 - 
Methods inherited from class org.onosproject.store.AbstractStorehasDelegate, notifyDelegate, notifyDelegate, unsetDelegate
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.onosproject.store.StorehasDelegate, unsetDelegate
 
- 
 
- 
- 
- 
Field Detail- 
clusterCommunicatorprotected ClusterCommunicationService clusterCommunicator 
 - 
clusterServiceprotected ClusterService clusterService 
 - 
storageServiceprotected StorageService storageService 
 - 
idStoreprotected ApplicationIdStore idStore 
 - 
versionServiceprotected VersionService versionService 
 
- 
 - 
Method Detail- 
activatepublic void activate() 
 - 
deactivatepublic void deactivate() 
 - 
setDelegatepublic void setDelegate(ApplicationStoreDelegate delegate) Description copied from interface:StoreSets the delegate on the store.- Specified by:
- setDelegatein interface- Store<ApplicationEvent,ApplicationStoreDelegate>
- Overrides:
- setDelegatein class- AbstractStore<ApplicationEvent,ApplicationStoreDelegate>
- Parameters:
- delegate- new store delegate
 
 - 
getApplicationspublic java.util.Set<Application> getApplications() Description copied from interface:ApplicationStoreReturns the set of all installed applications.- Specified by:
- getApplicationsin interface- ApplicationStore
- Returns:
- set of installed apps
 
 - 
getIdpublic ApplicationId getId(java.lang.String name) Description copied from interface:ApplicationStoreReturns the registered id of the application with the given name.- Specified by:
- getIdin interface- ApplicationStore
- Parameters:
- name- application name
- Returns:
- registered application id
 
 - 
getApplicationpublic Application getApplication(ApplicationId appId) Description copied from interface:ApplicationStoreReturns the application with the supplied application identifier.- Specified by:
- getApplicationin interface- ApplicationStore
- Parameters:
- appId- application identifier
- Returns:
- application descriptor
 
 - 
getStatepublic ApplicationState getState(ApplicationId appId) Description copied from interface:ApplicationStoreReturns the current application state.- Specified by:
- getStatein interface- ApplicationStore
- Parameters:
- appId- application identifier
- Returns:
- application state
 
 - 
createpublic Application create(java.io.InputStream appDescStream) Description copied from interface:ApplicationStoreCreates the application from the specified application descriptor input stream.- Specified by:
- createin interface- ApplicationStore
- Parameters:
- appDescStream- application archive input stream
- Returns:
- application descriptor
 
 - 
removepublic void remove(ApplicationId appId) Description copied from interface:ApplicationStoreRemoves the specified application.- Specified by:
- removein interface- ApplicationStore
- Parameters:
- appId- application identifier
 
 - 
activatepublic void activate(ApplicationId appId) Description copied from interface:ApplicationStoreMark the application as active.- Specified by:
- activatein interface- ApplicationStore
- Parameters:
- appId- application identifier
 
 - 
deactivatepublic void deactivate(ApplicationId appId) Description copied from interface:ApplicationStoreMark the application as deactivated.- Specified by:
- deactivatein interface- ApplicationStore
- Parameters:
- appId- application identifier
 
 - 
getPermissionspublic java.util.Set<Permission> getPermissions(ApplicationId appId) Description copied from interface:ApplicationStoreReturns the permissions granted to the applications.- Specified by:
- getPermissionsin interface- ApplicationStore
- Parameters:
- appId- application identifier
- Returns:
- set of granted permissions
 
 - 
setPermissionspublic void setPermissions(ApplicationId appId, java.util.Set<Permission> permissions) Description copied from interface:ApplicationStoreUpdates the permissions granted to the applications.- Specified by:
- setPermissionsin interface- ApplicationStore
- Parameters:
- appId- application identifier
- permissions- set of granted permissions
 
 - 
getApplicationArchivepublic java.io.InputStream getApplicationArchive(ApplicationId appId) Description copied from interface:ApplicationStoreReturns stream that contains the application OAR/JAR file contents.- Specified by:
- getApplicationArchivein interface- ApplicationStore
- Parameters:
- appId- application identifier
- Returns:
- input stream containing the app OAR/JAR file
 
 
- 
 
-