public DIIgniteServers() { // Create a set of mocked configurations for caches the servers was want var mockedConfigs = new List <CacheConfiguration> { new CacheConfiguration(TRexCaches.MutableNonSpatialCacheName()), new CacheConfiguration(TRexCaches.SpatialSubGridDirectoryCacheName(StorageMutability.Mutable)), new CacheConfiguration(TRexCaches.SpatialSubGridDirectoryCacheName(StorageMutability.Immutable)), new CacheConfiguration(TRexCaches.SpatialSubGridSegmentCacheName(StorageMutability.Mutable)), new CacheConfiguration(TRexCaches.SpatialSubGridSegmentCacheName(StorageMutability.Immutable)), new CacheConfiguration(TRexCaches.ImmutableNonSpatialCacheName()), new CacheConfiguration(TRexCaches.SiteModelMetadataCacheName()), new CacheConfiguration(TRexCaches.DesignTopologyExistenceMapsCacheName()), new CacheConfiguration(TRexCaches.TAGFileBufferQueueCacheName()), new CacheConfiguration(TRexCaches.SegmentRetirementQueueCacheName()), new CacheConfiguration(TRexCaches.SiteModelChangeBufferQueueCacheName()), new CacheConfiguration(TRexCaches.ProductionDataExistenceMapCacheName(StorageMutability.Mutable)), new CacheConfiguration(TRexCaches.ProductionDataExistenceMapCacheName(StorageMutability.Mutable)) }; var igniteConfiguration = new IgniteConfiguration { CacheConfiguration = mockedConfigs }; // Get the mocked Ignite instance and add the configuration to it IgniteMock.Immutable.mockIgnite.Setup(x => x.GetConfiguration()).Returns(igniteConfiguration); IgniteMock.Mutable.mockIgnite.Setup(x => x.GetConfiguration()).Returns(igniteConfiguration); }
private void InstantiateSiteModelExistenceMapsCacheReference() { immutableTRexGrid.GetOrCreateCache <INonSpatialAffinityKey, ISerialisedByteArrayWrapper>(new CacheConfiguration { Name = TRexCaches.ProductionDataExistenceMapCacheName(StorageMutability.Immutable), KeepBinaryInStore = true, CacheMode = CacheMode.Replicated, Backups = 0, // No backups need as it is a replicated cache DataRegionName = DataRegions.IMMUTABLE_SPATIAL_DATA_REGION }); }
public void NonNullNames() { TRexCaches.DesignTopologyExistenceMapsCacheName().Should().NotBeNullOrWhiteSpace(); TRexCaches.ImmutableNonSpatialCacheName().Should().NotBeNullOrWhiteSpace(); TRexCaches.SpatialSubGridDirectoryCacheName(StorageMutability.Immutable).Should().NotBeNullOrWhiteSpace(); TRexCaches.SpatialSubGridDirectoryCacheName(StorageMutability.Mutable).Should().NotBeNullOrWhiteSpace(); TRexCaches.SpatialSubGridSegmentCacheName(StorageMutability.Immutable).Should().NotBeNullOrWhiteSpace(); TRexCaches.SpatialSubGridSegmentCacheName(StorageMutability.Mutable).Should().NotBeNullOrWhiteSpace(); TRexCaches.MutableNonSpatialCacheName().Should().NotBeNullOrWhiteSpace(); TRexCaches.SegmentRetirementQueueCacheName().Should().NotBeNullOrWhiteSpace(); TRexCaches.SiteModelMetadataCacheName().Should().NotBeNullOrWhiteSpace(); TRexCaches.SiteModelsCacheName(StorageMutability.Immutable).Should().NotBeNullOrWhiteSpace(); TRexCaches.SiteModelsCacheName(StorageMutability.Mutable).Should().NotBeNullOrWhiteSpace(); TRexCaches.TAGFileBufferQueueCacheName().Should().NotBeNullOrWhiteSpace(); TRexCaches.SiteModelChangeMapsCacheName().Should().NotBeNullOrWhiteSpace(); TRexCaches.ProductionDataExistenceMapCacheName(StorageMutability.Immutable).Should().NotBeNullOrWhiteSpace(); TRexCaches.ProductionDataExistenceMapCacheName(StorageMutability.Mutable).Should().NotBeNullOrWhiteSpace(); }