Class FederatedScheme

java.lang.Object
com.tangosol.coherence.config.scheme.AbstractScheme
com.tangosol.coherence.config.scheme.AbstractServiceScheme<com.tangosol.internal.net.service.grid.PartitionedCacheDependencies>
com.tangosol.coherence.config.scheme.AbstractCachingScheme<com.tangosol.internal.net.service.grid.PartitionedCacheDependencies>
com.tangosol.coherence.config.scheme.DistributedScheme
com.tangosol.coherence.config.scheme.FederatedScheme
All Implemented Interfaces:
BackingMapManagerBuilder, MapBuilder, NamedCacheBuilder, ServiceBuilder, BundlingScheme, CachingScheme, ClusteredCachingScheme, ObservableCachingScheme, Scheme, ServiceScheme

public class FederatedScheme extends DistributedScheme
A FederatedScheme creates the infrastructure required for federated caches.
Since:
12.2.1
Author:
pp 2012.02.28
  • Field Details

    • JOURNALCACHE_HIGHUNITS

      public static final String JOURNALCACHE_HIGHUNITS
      The name of the XML element to set the high-units on the cache for federation journal entries.
      Since:
      12.2.1.4
      See Also:
  • Constructor Details

  • Method Details

    • getServiceType

      public String getServiceType()
      Return the service type.
      Specified by:
      getServiceType in interface ServiceScheme
      Overrides:
      getServiceType in class DistributedScheme
      Returns:
      the service type
    • realizeBackingMapManager

      public BackingMapManager realizeBackingMapManager(ConfigurableCacheFactory factory)
      Description copied from class: AbstractCachingScheme
      Realize a BackingMapManager to be scoped by the specified ConfigurableCacheFactory.
      Specified by:
      realizeBackingMapManager in interface BackingMapManagerBuilder
      Overrides:
      realizeBackingMapManager in class AbstractCachingScheme<com.tangosol.internal.net.service.grid.PartitionedCacheDependencies>
      Parameters:
      factory - the ConfigurableCacheFactory
      Returns:
      a BackingMapManager
    • validate

      protected void validate()
      Validate the properties.
      Overrides:
      validate in class AbstractScheme
    • getLoadBalancerBuilder

      public FederatedServiceLoadBalancerBuilder getLoadBalancerBuilder()
      Return the load-balancer builder.
      Returns:
      the load balancer builder
    • setLoadBalancer

      @Injectable("load-balancer") public void setLoadBalancer(FederatedServiceLoadBalancerBuilder bldrLoadBalancer)
      Set the load-balancer builder.
      Parameters:
      bldrLoadBalancer - the federation service load-balancer
    • getParticipantDestination

      public String getParticipantDestination()
      Return the Participant destination name.

      The service name will be returned if no destination name has been specified.

      Returns:
      the Participant destination name
      Since:
      14.1.2.0.0
    • setParticipantDestination

      @Injectable("participant-destination-name") public void setParticipantDestination(String sParticipantDest)
      Set the Participant destination name.
      Parameters:
      sParticipantDest - the destination name
      Since:
      14.1.2.0.0
    • getTopologies

      public List<FederatedScheme.TopologyReference> getTopologies()
      Return the list of topology references.
      Returns:
      the list of topology references
    • setTopologies

      @Injectable public void setTopologies(List<FederatedScheme.TopologyReference> listRefs)
      Set the list of topology references.
      Parameters:
      listRefs - the list of topology references
    • setJournalcacheHighunits

      @Injectable public void setJournalcacheHighunits(String sHighUnits)
      Set the high-units limit for the federation journal cache.
      Parameters:
      sHighUnits - the high-units limit.
      Since:
      12.2.1.4
    • setJournalcacheHighunits

      @Deprecated public void setJournalcacheHighunits(int nHighUnits)
      Deprecated.
      Set the high-units limit for the federation journal cache.
      Parameters:
      nHighUnits - the high-units limit.
    • getJournalcacheBackingMapScheme

      public BackingMapScheme getJournalcacheBackingMapScheme()
      Return the BackingMapScheme which builds the backing map for federation's internal caches.
      Returns:
      the scheme
      Since:
      12.2.1.4
    • setJournalcacheBackingMapScheme

      @Injectable public void setJournalcacheBackingMapScheme(BackingMapScheme scheme)
      Set the BackingMapScheme which builds the backing map for federation's internal caches.
      Parameters:
      scheme - the scheme builder
      Since:
      12.2.1.4
    • setSendOldValue

      @Injectable public void setSendOldValue(boolean fSendOldValue)
      Set the flag to indicate if the old value should be sent when replicating.
      Parameters:
      fSendOldValue - true if the old value should be sent.
    • setFederatedLoading

      @Injectable("backing-map-scheme/read-write-backing-map-scheme/cachestore-scheme/federated-loading") public void setFederatedLoading(boolean fFederatedLoading)
      Set the flag to indicate if the cache store load should be federated.
      Parameters:
      fFederatedLoading - true if the cache store load should be federated.
    • getAddressProvider

      public AddressProvider getAddressProvider()
      Return the configured address-provider builder.
      Returns:
      the configured address provider builder or null
    • setAddressProvider

      @Injectable("address-provider") public void setAddressProvider(ParameterizedBuilder<AddressProvider> addrProviderBuilder)
      Set the address provider.
      Parameters:
      addrProviderBuilder - the federation service address provider builder
    • getSocketProviderBuilder

      public SocketProviderBuilder getSocketProviderBuilder()
      Return the configured socket provider builder
      Returns:
      the configured socket provider builder
    • setSocketProviderBuilder

      @Injectable("socket-provider") public void setSocketProviderBuilder(SocketProviderBuilder builder)
      Parameters:
      builder - the configured socket provider builder
    • getAckCacheName

      public String getAckCacheName()
      Return the name of the ack cache for this service.
      Returns:
      the ack cache name
    • getEnvelopeCacheName

      public String getEnvelopeCacheName()
      Return the name of the envelope cache for this service.
      Returns:
      the envelope cache name
    • getJournalCacheName

      public String getJournalCacheName()
      Return the name of the journal cache for this service.
      Returns:
      the journal cache name
    • getInternalCacheNames

      public Set<String> getInternalCacheNames()
      Return a set of internal cache names.
      Returns:
      set of internal cache names
    • initInternalCacheNames

      public Set<String> initInternalCacheNames()
      Initialize the internal cache names.

      Needs to be called prior to using the getters on the internal cache names and set of cache names.

      Returns:
      the set of internal cache names
    • getNameConverter

      public FederatedScheme.NameConverter getNameConverter()
      Return a converter that converts an internal cache name to a cache-mapping that ties it to this federated scheme.
      Returns:
      internal cache name converter