Available Methods
- setCacheMode ( )
- setAtomicityMode ( )
- setWriteSynchronizationMode ( )
- setBackups ( )
- setName ( )
- setNearConfiguration ( )
- setAffinity ( )
- setIndexedTypes ( )
- setRebalanceMode ( )
- setCacheStoreFactory ( )
- setWriteThrough ( )
- setReadThrough ( )
- setQueryEntities ( )
- setLoadPreviousValue ( )
- setEvictionPolicy ( )
- setNodeFilter ( )
- setAffinityMapper ( )
- setGroupName ( )
- setOnheapCacheEnabled ( )
- getName ( )
- setStatisticsEnabled ( )
- setReadFromBackup ( )
- setSqlSchema ( )
- setWriteBehindEnabled ( )
- setDataRegionName ( )
- getAtomicityMode ( )
- setRebalanceBatchSize ( )
- setCacheStoreSessionListenerFactories ( )
- getGroupName ( )
- getCacheMode ( )
- setKeyConfiguration ( )
- setExpiryPolicyFactory ( )
- getAffinity ( )
- setEvictionFilter ( )
- setStoreKeepBinary ( )
- setSqlFunctionClasses ( )
- setQueryDetailMetricsSize ( )
- getQueryEntities ( )
- setRebalanceDelay ( )
- setEagerTtl ( )
- setWriteBehindFlushFrequency ( )
- IgniteAllNodesPredicate ( )
- setRebalanceOrder ( )
- isManagementEnabled ( )
- setInterceptor ( )
- setEncryptionEnabled ( )
- setSqlEscapeAll ( )
- setPartitionLossPolicy ( )
- getBackups ( )
- getEvictionFilter ( )
- getDataRegionName ( )
- getEvictionPolicyFactory ( )
Related Classes
- java.util.Arrays
- java.util.Collections
- java.util.concurrent.TimeUnit
- java.util.Random
- java.util.UUID
- java.util.LinkedHashMap
- java.util.concurrent.atomic.AtomicInteger
- java.util.concurrent.Callable
- java.util.concurrent.atomic.AtomicBoolean
- java.util.concurrent.CountDownLatch
- org.junit.Ignore
- java.sql.Connection
- java.util.concurrent.ThreadLocalRandom
- org.jetbrains.annotations.NotNull
- org.jetbrains.annotations.Nullable
- java.util.concurrent.CyclicBarrier
- javax.cache.Cache
- javax.cache.expiry.Duration
- org.apache.ignite.Ignite
- javax.cache.expiry.CreatedExpiryPolicy
- org.apache.ignite.Ignition
- javax.cache.CacheException
- org.apache.ignite.IgniteCache
- org.apache.ignite.configuration.IgniteConfiguration
- javax.cache.configuration.FactoryBuilder
Java Code Examples for org.apache.ignite.configuration.CacheConfiguration#IgniteAllNodesPredicate
The following examples show how to use
org.apache.ignite.configuration.CacheConfiguration#IgniteAllNodesPredicate .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PartitionExtractor.java From ignite with Apache License 2.0 | 6 votes |
/** * Prepare affinity identifier for cache. * * @param ccfg Cache configuration. * @return Affinity identifier. */ private static PartitionTableAffinityDescriptor affinityForCache(CacheConfiguration ccfg) { // Partition could be extracted only from PARTITIONED caches. if (ccfg.getCacheMode() != CacheMode.PARTITIONED) return null; PartitionAffinityFunctionType aff = ccfg.getAffinity().getClass().equals(RendezvousAffinityFunction.class) ? PartitionAffinityFunctionType.RENDEZVOUS : PartitionAffinityFunctionType.CUSTOM; boolean hasNodeFilter = ccfg.getNodeFilter() != null && !(ccfg.getNodeFilter() instanceof CacheConfiguration.IgniteAllNodesPredicate); return new PartitionTableAffinityDescriptor( aff, ccfg.getAffinity().partitions(), hasNodeFilter, ccfg.getDataRegionName() ); }
Example 2
Source File: ClientCachePartitionsRequest.java From ignite with Apache License 2.0 | 6 votes |
/** * @param ccfg Cache configuration. * @return True if cache is applicable for partition awareness optimisation. */ private static boolean isApplicable(CacheConfiguration ccfg) { // Partition could be extracted only from PARTITIONED caches. if (ccfg.getCacheMode() != CacheMode.PARTITIONED) return false; // Only caches with no custom affinity key mapper is supported. AffinityKeyMapper keyMapper = ccfg.getAffinityMapper(); if (!(keyMapper instanceof CacheDefaultBinaryAffinityKeyMapper)) return false; // Only RendezvousAffinityFunction is supported for now. if (!ccfg.getAffinity().getClass().equals(RendezvousAffinityFunction.class)) return false; IgnitePredicate filter = ccfg.getNodeFilter(); boolean hasNodeFilter = filter != null && !(filter instanceof CacheConfiguration.IgniteAllNodesPredicate); // We cannot be sure that two caches are co-located if custom node filter is present. // Note that technically we may try to compare two filters. However, this adds unnecessary complexity // and potential deserialization issues. return !hasNodeFilter; }