Class AzureManager<T,K>
- java.lang.Object
-
- com.azure.spring.cloud.context.core.impl.AzureManager<T,K>
-
- Type Parameters:
T
- The type of resource.K
- The type of resource key.
- All Implemented Interfaces:
ResourceManager<T,K>
- Direct Known Subclasses:
EventHubConsumerGroupManager
,EventHubManager
,EventHubNamespaceManager
,RedisCacheManager
,ResourceGroupManager
,ServiceBusNamespaceManager
,ServiceBusQueueManager
,ServiceBusTopicManager
,ServiceBusTopicSubscriptionManager
,StorageAccountManager
public abstract class AzureManager<T,K> extends Object implements ResourceManager<T,K>
Abstract Azure resource manager.
-
-
Field Summary
Fields Modifier and Type Field Description protected String
region
The region.protected String
resourceGroup
The resource group.
-
Constructor Summary
Constructors Constructor Description AzureManager(AzureProperties azureProperties)
Creates a new instance ofAzureManager
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
create(K key)
Creates a value for a given key.boolean
exists(K key)
Checks for the existence of a given key.T
get(K key)
Gets a value for a given key.T
getOrCreate(K key)
Gets or creates a value for a given key.
-
-
-
Constructor Detail
-
AzureManager
public AzureManager(@NonNull AzureProperties azureProperties)
Creates a new instance ofAzureManager
.- Parameters:
azureProperties
- The Azure properties.
-
-
Method Detail
-
exists
public boolean exists(K key)
Description copied from interface:ResourceManager
Checks for the existence of a given key.- Specified by:
exists
in interfaceResourceManager<T,K>
- Parameters:
key
- The key.- Returns:
- Whether the key exists.
-
get
public T get(K key)
Description copied from interface:ResourceManager
Gets a value for a given key.- Specified by:
get
in interfaceResourceManager<T,K>
- Parameters:
key
- The key.- Returns:
- The retrieved value.
-
create
public T create(K key)
Description copied from interface:ResourceManager
Creates a value for a given key.- Specified by:
create
in interfaceResourceManager<T,K>
- Parameters:
key
- The key.- Returns:
- The created value.
-
getOrCreate
public T getOrCreate(K key)
Description copied from interface:ResourceManager
Gets or creates a value for a given key.- Specified by:
getOrCreate
in interfaceResourceManager<T,K>
- Parameters:
key
- The key.- Returns:
- The retrieved or created value.
-
-