Search in sources :

Example 6 with CacheLoader

use of org.apache.geode.cache.CacheLoader in project geode by apache.

the class GemcachedBinaryClientJUnitTest method testCacheLoaderException.

@SuppressWarnings("unchecked")
public void testCacheLoaderException() throws Exception {
    MemcachedClient client = createMemcachedClient();
    assertTrue(client.set("key", 0, "value").get());
    GemFireCacheImpl cache = GemFireCacheImpl.getInstance();
    Region region = cache.getRegion(GemFireMemcachedServer.REGION_NAME);
    region.getAttributesMutator().setCacheLoader(new CacheLoader() {

        @Override
        public void close() {
        }

        @Override
        public Object load(LoaderHelper helper) throws CacheLoaderException {
            if (helper.getKey().equals(KeyWrapper.getWrappedKey("exceptionkey".getBytes()))) {
                throw new RuntimeException("ExpectedStrings: Cache loader exception");
            }
            return null;
        }
    });
    long start = System.nanoTime();
    try {
        client.get("exceptionkey");
        throw new RuntimeException("expected exception not thrown");
    } catch (Exception e) {
    // expected
    }
    assertEquals("value", client.get("key"));
}
Also used : LoaderHelper(org.apache.geode.cache.LoaderHelper) CacheLoaderException(org.apache.geode.cache.CacheLoaderException) MemcachedClient(net.spy.memcached.MemcachedClient) GemFireCacheImpl(org.apache.geode.internal.cache.GemFireCacheImpl) Region(org.apache.geode.cache.Region) CacheLoader(org.apache.geode.cache.CacheLoader) CacheLoaderException(org.apache.geode.cache.CacheLoaderException) IOException(java.io.IOException) UnknownHostException(java.net.UnknownHostException) ExecutionException(java.util.concurrent.ExecutionException) CacheWriterException(org.apache.geode.cache.CacheWriterException)

Example 7 with CacheLoader

use of org.apache.geode.cache.CacheLoader in project geode by apache.

the class MemoryThresholdsOffHeapDUnitTest method testLRLoadRejection.

/**
   * Test that LocalRegion cache Loads are not stored in the Region if the VM is in a critical
   * state, then test that they are allowed once the VM is no longer critical
   */
@Test
public void testLRLoadRejection() throws Exception {
    final Host host = Host.getHost(0);
    final VM vm = host.getVM(2);
    final String rName = getUniqueName();
    vm.invoke(() -> disconnectFromDS());
    vm.invoke(new CacheSerializableRunnable("test LocalRegion load passthrough when critical") {

        @Override
        public void run2() throws CacheException {
            getSystem(getOffHeapProperties());
            InternalResourceManager irm = (InternalResourceManager) getCache().getResourceManager();
            final OffHeapMemoryMonitor ohmm = irm.getOffHeapMonitor();
            irm.setCriticalOffHeapPercentage(90f);
            AttributesFactory<Integer, String> af = new AttributesFactory<Integer, String>();
            af.setScope(Scope.LOCAL);
            af.setOffHeap(true);
            final AtomicInteger numLoaderInvocations = new AtomicInteger(0);
            af.setCacheLoader(new CacheLoader<Integer, String>() {

                public String load(LoaderHelper<Integer, String> helper) throws CacheLoaderException {
                    numLoaderInvocations.incrementAndGet();
                    return helper.getKey().toString();
                }

                public void close() {
                }
            });
            final LocalRegion r = (LocalRegion) getCache().createRegion(rName, af.create());
            assertFalse(ohmm.getState().isCritical());
            int expectedInvocations = 0;
            assertEquals(expectedInvocations++, numLoaderInvocations.get());
            {
                Integer k = new Integer(1);
                assertEquals(k.toString(), r.get(k));
            }
            assertEquals(expectedInvocations++, numLoaderInvocations.get());
            expectedInvocations++;
            expectedInvocations++;
            r.getAll(createRanges(10, 12));
            assertEquals(expectedInvocations++, numLoaderInvocations.get());
            getCache().getLoggerI18n().fine(addExpectedExString);
            r.put("oh1", new byte[838860]);
            r.put("oh3", new byte[157287]);
            getCache().getLoggerI18n().fine(removeExpectedExString);
            WaitCriterion wc = new WaitCriterion() {

                public String description() {
                    return "expected region " + r + " to set memoryThresholdReached";
                }

                public boolean done() {
                    return r.memoryThresholdReached.get();
                }
            };
            Wait.waitForCriterion(wc, 30 * 1000, 10, true);
            {
                Integer k = new Integer(2);
                assertEquals(k.toString(), r.get(k));
            }
            assertEquals(expectedInvocations++, numLoaderInvocations.get());
            expectedInvocations++;
            expectedInvocations++;
            r.getAll(createRanges(13, 15));
            assertEquals(expectedInvocations++, numLoaderInvocations.get());
            getCache().getLoggerI18n().fine(addExpectedBelow);
            r.destroy("oh3");
            getCache().getLoggerI18n().fine(removeExpectedBelow);
            wc = new WaitCriterion() {

                public String description() {
                    return "expected region " + r + " to unset memoryThresholdReached";
                }

                public boolean done() {
                    return !r.memoryThresholdReached.get();
                }
            };
            Wait.waitForCriterion(wc, 30 * 1000, 10, true);
            {
                Integer k = new Integer(3);
                assertEquals(k.toString(), r.get(k));
            }
            assertEquals(expectedInvocations++, numLoaderInvocations.get());
            expectedInvocations++;
            expectedInvocations++;
            r.getAll(createRanges(16, 18));
            assertEquals(expectedInvocations, numLoaderInvocations.get());
            // Do extra validation that the entry doesn't exist in the local region
            for (Integer i : createRanges(2, 2, 13, 15)) {
                if (r.containsKey(i)) {
                    fail("Expected containsKey return false for key" + i);
                }
                if (r.getEntry(i) != null) {
                    fail("Expected getEntry to return null for key" + i);
                }
            }
        }
    });
}
Also used : OffHeapMemoryMonitor(org.apache.geode.internal.cache.control.OffHeapMemoryMonitor) CacheException(org.apache.geode.cache.CacheException) Host(org.apache.geode.test.dunit.Host) LocalRegion(org.apache.geode.internal.cache.LocalRegion) InternalResourceManager(org.apache.geode.internal.cache.control.InternalResourceManager) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) LoaderHelper(org.apache.geode.cache.LoaderHelper) AttributesFactory(org.apache.geode.cache.AttributesFactory) PartitionAttributesFactory(org.apache.geode.cache.PartitionAttributesFactory) WaitCriterion(org.apache.geode.test.dunit.WaitCriterion) CacheSerializableRunnable(org.apache.geode.cache30.CacheSerializableRunnable) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) VM(org.apache.geode.test.dunit.VM) CacheLoader(org.apache.geode.cache.CacheLoader) DistributedTest(org.apache.geode.test.junit.categories.DistributedTest) FlakyTest(org.apache.geode.test.junit.categories.FlakyTest) Test(org.junit.Test)

Example 8 with CacheLoader

use of org.apache.geode.cache.CacheLoader in project geode by apache.

the class MemoryThresholdsDUnitTest method testLRLoadRejection.

/**
   * Test that LocalRegion cache Loads are not stored in the Region if the VM is in a critical
   * state, then test that they are allowed once the VM is no longer critical
   * 
   * @throws Exception
   */
@Test
public void testLRLoadRejection() throws Exception {
    final Host host = Host.getHost(0);
    final VM vm = host.getVM(2);
    final String rName = getUniqueName();
    final float criticalHeapThresh = 0.90f;
    final int fakeHeapMaxSize = 1000;
    vm.invoke(() -> disconnectFromDS());
    vm.invoke(new CacheSerializableRunnable("test LocalRegion load passthrough when critical") {

        @Override
        public void run2() throws CacheException {
            InternalResourceManager irm = (InternalResourceManager) getCache().getResourceManager();
            HeapMemoryMonitor hmm = irm.getHeapMonitor();
            // below
            long fakeHeapUsage = Math.round(fakeHeapMaxSize * (criticalHeapThresh - 0.5f));
            // critical
            // by 50%
            assertTrue(fakeHeapMaxSize > 0);
            irm.getHeapMonitor().setTestMaxMemoryBytes(fakeHeapMaxSize);
            HeapMemoryMonitor.setTestBytesUsedForThresholdSet(fakeHeapUsage);
            irm.setCriticalHeapPercentage((criticalHeapThresh * 100.0f));
            AttributesFactory<Integer, String> af = new AttributesFactory<Integer, String>();
            af.setScope(Scope.LOCAL);
            final AtomicInteger numLoaderInvocations = new AtomicInteger();
            af.setCacheLoader(new CacheLoader<Integer, String>() {

                public String load(LoaderHelper<Integer, String> helper) throws CacheLoaderException {
                    numLoaderInvocations.incrementAndGet();
                    return helper.getKey().toString();
                }

                public void close() {
                }
            });
            Region<Integer, String> r = getCache().createRegion(rName, af.create());
            assertFalse(hmm.getState().isCritical());
            int expectedInvocations = 0;
            assertEquals(expectedInvocations++, numLoaderInvocations.get());
            {
                Integer k = new Integer(1);
                assertEquals(k.toString(), r.get(k));
            }
            assertEquals(expectedInvocations++, numLoaderInvocations.get());
            expectedInvocations++;
            expectedInvocations++;
            r.getAll(createRanges(10, 12));
            assertEquals(expectedInvocations++, numLoaderInvocations.get());
            getCache().getLoggerI18n().fine(addExpectedExString);
            // usage above
            fakeHeapUsage = Math.round(fakeHeapMaxSize * (criticalHeapThresh + 0.1f));
            // critical by
            // 10%
            assertTrue(fakeHeapUsage > 0);
            assertTrue(fakeHeapUsage <= fakeHeapMaxSize);
            hmm.updateStateAndSendEvent(fakeHeapUsage);
            getCache().getLoggerI18n().fine(removeExpectedExString);
            assertTrue(hmm.getState().isCritical());
            {
                Integer k = new Integer(2);
                assertEquals(k.toString(), r.get(k));
            }
            assertEquals(expectedInvocations++, numLoaderInvocations.get());
            expectedInvocations++;
            expectedInvocations++;
            r.getAll(createRanges(13, 15));
            assertEquals(expectedInvocations++, numLoaderInvocations.get());
            // below critical
            fakeHeapUsage = Math.round(fakeHeapMaxSize * (criticalHeapThresh - 0.3f));
            // by 30%
            assertTrue(fakeHeapMaxSize > 0);
            getCache().getLoggerI18n().fine(addExpectedBelow);
            hmm.updateStateAndSendEvent(fakeHeapUsage);
            getCache().getLoggerI18n().fine(removeExpectedBelow);
            assertFalse(hmm.getState().isCritical());
            {
                Integer k = new Integer(3);
                assertEquals(k.toString(), r.get(k));
            }
            assertEquals(expectedInvocations++, numLoaderInvocations.get());
            expectedInvocations++;
            expectedInvocations++;
            r.getAll(createRanges(16, 18));
            assertEquals(expectedInvocations, numLoaderInvocations.get());
            // Do extra validation that the entry doesn't exist in the local region
            for (Integer i : createRanges(2, 2, 13, 15)) {
                if (r.containsKey(i)) {
                    fail("Expected containsKey return false for key" + i);
                }
                if (r.getEntry(i) != null) {
                    fail("Expected getEntry to return null for key" + i);
                }
            }
        }
    });
}
Also used : CacheException(org.apache.geode.cache.CacheException) Host(org.apache.geode.test.dunit.Host) HeapMemoryMonitor(org.apache.geode.internal.cache.control.HeapMemoryMonitor) InternalResourceManager(org.apache.geode.internal.cache.control.InternalResourceManager) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) LoaderHelper(org.apache.geode.cache.LoaderHelper) AttributesFactory(org.apache.geode.cache.AttributesFactory) PartitionAttributesFactory(org.apache.geode.cache.PartitionAttributesFactory) CacheSerializableRunnable(org.apache.geode.cache30.CacheSerializableRunnable) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) VM(org.apache.geode.test.dunit.VM) DistributedRegion(org.apache.geode.internal.cache.DistributedRegion) PartitionedRegion(org.apache.geode.internal.cache.PartitionedRegion) Region(org.apache.geode.cache.Region) CacheLoader(org.apache.geode.cache.CacheLoader) DistributedTest(org.apache.geode.test.junit.categories.DistributedTest) FlakyTest(org.apache.geode.test.junit.categories.FlakyTest) Test(org.junit.Test)

Example 9 with CacheLoader

use of org.apache.geode.cache.CacheLoader in project geode by apache.

the class IndexMaintenanceJUnitTest method testIndexMaintenanceOnCacheLoadedData.

/**
   * Tests Index maintenance on data loaded via cache loader
   */
@Test
public void testIndexMaintenanceOnCacheLoadedData() {
    try {
        IndexManager.TEST_RANGEINDEX_ONLY = true;
        Cache cache = CacheUtils.getCache();
        qs = cache.getQueryService();
        region = CacheUtils.createRegion("portfolio1", null);
        AttributesMutator am = region.getAttributesMutator();
        am.setCacheLoader(new CacheLoader() {

            public Object load(LoaderHelper helper) throws CacheLoaderException {
                String key = (String) helper.getKey();
                Portfolio p = new Portfolio(Integer.parseInt(key));
                return p;
            }

            public void close() {
            // TODO Auto-generated method stub
            }
        });
        Index i1 = qs.createIndex("indx1", IndexType.FUNCTIONAL, "pf.getID()", "/portfolio1 pf");
        List keys = new ArrayList();
        keys.add("1");
        keys.add("2");
        keys.add("3");
        keys.add("4");
        region.getAll(keys);
    } catch (Exception e) {
        CacheUtils.getLogger().error(e);
        fail(e.toString());
    }
}
Also used : LoaderHelper(org.apache.geode.cache.LoaderHelper) CacheLoaderException(org.apache.geode.cache.CacheLoaderException) Portfolio(org.apache.geode.cache.query.data.Portfolio) ArrayList(java.util.ArrayList) CacheLoader(org.apache.geode.cache.CacheLoader) Index(org.apache.geode.cache.query.Index) ArrayList(java.util.ArrayList) List(java.util.List) CacheLoaderException(org.apache.geode.cache.CacheLoaderException) Cache(org.apache.geode.cache.Cache) AttributesMutator(org.apache.geode.cache.AttributesMutator) Test(org.junit.Test) IntegrationTest(org.apache.geode.test.junit.categories.IntegrationTest)

Example 10 with CacheLoader

use of org.apache.geode.cache.CacheLoader in project geode by apache.

the class MultiVMRegionTestCase method testTXUpdateLoadNoConflict.

/**
   * Tests that the push of a loaded value does not cause a conflict on the side receiving the
   * update
   */
@Ignore("TODO: this test always hits early out")
@Test
public void testTXUpdateLoadNoConflict() throws Exception {
    /*
     * this no longer holds true - we have load conflicts now
     * 
     */
    if (true) {
        return;
    }
    assumeTrue(supportsTransactions());
    assumeFalse(getRegionAttributes().getScope().isGlobal());
    assumeFalse(getRegionAttributes().getDataPolicy().withPersistence());
    assertTrue(getRegionAttributes().getScope().isDistributed());
    CacheTransactionManager txMgr = this.getCache().getCacheTransactionManager();
    final String rgnName = getUniqueName();
    SerializableRunnable create = new SerializableRunnable("testTXUpdateLoadNoConflict: Create Region & Load value") {

        @Override
        public void run() {
            CacheTransactionManager txMgr2 = getCache().getCacheTransactionManager();
            MyTransactionListener tl = new MyTransactionListener();
            txMgr2.addListener(tl);
            try {
                Region rgn = createRegion(rgnName);
                AttributesMutator mutator = rgn.getAttributesMutator();
                mutator.setCacheLoader(new CacheLoader() {

                    int count = 0;

                    @Override
                    public Object load(LoaderHelper helper) throws CacheLoaderException {
                        count++;
                        return "LV " + count;
                    }

                    @Override
                    public void close() {
                    }
                });
                Object value = rgn.get("key");
                assertEquals("LV 1", value);
                getSystem().getLogWriter().info("testTXUpdateLoadNoConflict: loaded Key");
                flushIfNecessary(rgn);
            } catch (CacheException e) {
                fail("While creating region", e);
            }
        }
    };
    VM vm0 = Host.getHost(0).getVM(0);
    try {
        MyTransactionListener tl = new MyTransactionListener();
        txMgr.addListener(tl);
        AttributesFactory rgnAtts = new AttributesFactory(getRegionAttributes());
        rgnAtts.setDataPolicy(DataPolicy.REPLICATE);
        Region rgn = createRegion(rgnName, rgnAtts.create());
        txMgr.begin();
        TransactionId myTXId = txMgr.getTransactionId();
        rgn.create("key", "txValue");
        vm0.invoke(create);
        {
            TXStateProxy tx = ((TXManagerImpl) txMgr).internalSuspend();
            assertTrue(rgn.containsKey("key"));
            assertEquals("LV 1", rgn.getEntry("key").getValue());
            ((TXManagerImpl) txMgr).internalResume(tx);
        }
        // make sure transactional view is still correct
        assertEquals("txValue", rgn.getEntry("key").getValue());
        txMgr.commit();
        getSystem().getLogWriter().info("testTXUpdateLoadNoConflict: did commit");
        assertEquals("txValue", rgn.getEntry("key").getValue());
        {
            Collection events = tl.lastEvent.getCreateEvents();
            assertEquals(1, events.size());
            EntryEvent ev = (EntryEvent) events.iterator().next();
            assertEquals(myTXId, ev.getTransactionId());
            assertTrue(ev.getRegion() == rgn);
            assertEquals("key", ev.getKey());
            assertEquals("txValue", ev.getNewValue());
            assertEquals(null, ev.getOldValue());
            assertTrue(!ev.getOperation().isLocalLoad());
            assertTrue(!ev.getOperation().isNetLoad());
            assertTrue(!ev.getOperation().isLoad());
            assertTrue(!ev.getOperation().isNetSearch());
            assertTrue(!ev.getOperation().isExpiration());
            assertEquals(null, ev.getCallbackArgument());
            assertEquals(true, ev.isCallbackArgumentAvailable());
            assertTrue(!ev.isOriginRemote());
            assertTrue(ev.getOperation().isDistributed());
        }
        // Now setup recreate the region in the controller with NONE
        // so test can do local destroys.
        rgn.localDestroyRegion();
        rgnAtts.setDataPolicy(DataPolicy.NORMAL);
        rgn = createRegion(rgnName, rgnAtts.create());
        // now see if net loader is working
        Object v2 = rgn.get("key2");
        assertEquals("LV 2", v2);
        // now confirm that netload does not cause a conflict
        txMgr.begin();
        myTXId = txMgr.getTransactionId();
        rgn.create("key3", "txValue3");
        {
            TXStateProxy tx = ((TXManagerImpl) txMgr).internalSuspend();
            // do a get outside of the transaction to force a net load
            Object v3 = rgn.get("key3");
            assertEquals("LV 3", v3);
            ((TXManagerImpl) txMgr).internalResume(tx);
        }
        // make sure transactional view is still correct
        assertEquals("txValue3", rgn.getEntry("key3").getValue());
        txMgr.commit();
        getSystem().getLogWriter().info("testTXUpdateLoadNoConflict: did commit");
        assertEquals("txValue3", rgn.getEntry("key3").getValue());
        {
            Collection events = tl.lastEvent.getCreateEvents();
            assertEquals(1, events.size());
            EntryEvent ev = (EntryEvent) events.iterator().next();
            assertEquals(myTXId, ev.getTransactionId());
            assertTrue(ev.getRegion() == rgn);
            assertEquals("key3", ev.getKey());
            assertEquals("txValue3", ev.getNewValue());
            assertEquals(null, ev.getOldValue());
            assertTrue(!ev.getOperation().isLocalLoad());
            assertTrue(!ev.getOperation().isNetLoad());
            assertTrue(!ev.getOperation().isLoad());
            assertTrue(!ev.getOperation().isNetSearch());
            assertTrue(!ev.getOperation().isExpiration());
            assertEquals(null, ev.getCallbackArgument());
            assertEquals(true, ev.isCallbackArgumentAvailable());
            assertTrue(!ev.isOriginRemote());
            assertTrue(ev.getOperation().isDistributed());
        }
        // now see if tx net loader is working
        // now confirm that netload does not cause a conflict
        txMgr.begin();
        myTXId = txMgr.getTransactionId();
        Object v4 = rgn.get("key4");
        assertEquals("LV 4", v4);
        assertEquals("LV 4", rgn.get("key4"));
        assertEquals("LV 4", rgn.getEntry("key4").getValue());
        txMgr.rollback();
        // confirm that netLoad is transactional
        assertEquals("LV 5", rgn.get("key4"));
        assertEquals("LV 5", rgn.getEntry("key4").getValue());
        // make sure non-tx netsearch works
        assertEquals("txValue", rgn.get("key"));
        assertEquals("txValue", rgn.getEntry("key").getValue());
        // make sure net-search result does not conflict with commit
        rgn.localInvalidate("key");
        txMgr.begin();
        myTXId = txMgr.getTransactionId();
        rgn.put("key", "new txValue");
        {
            TXStateProxy tx = ((TXManagerImpl) txMgr).internalSuspend();
            // do a get outside of the transaction to force a netsearch
            // does a netsearch
            assertEquals("txValue", rgn.get("key"));
            assertEquals("txValue", rgn.getEntry("key").getValue());
            ((TXManagerImpl) txMgr).internalResume(tx);
        }
        // make sure transactional view is still correct
        assertEquals("new txValue", rgn.getEntry("key").getValue());
        txMgr.commit();
        // give other side change to process commit
        flushIfNecessary(rgn);
        getSystem().getLogWriter().info("testTXUpdateLoadNoConflict: did commit");
        assertEquals("new txValue", rgn.getEntry("key").getValue());
        {
            Collection events = tl.lastEvent.getPutEvents();
            assertEquals(1, events.size());
            EntryEvent ev = (EntryEvent) events.iterator().next();
            assertEquals(myTXId, ev.getTransactionId());
            assertTrue(ev.getRegion() == rgn);
            assertEquals("key", ev.getKey());
            assertEquals("new txValue", ev.getNewValue());
            assertEquals(null, ev.getOldValue());
            assertTrue(!ev.getOperation().isLocalLoad());
            assertTrue(!ev.getOperation().isNetLoad());
            assertTrue(!ev.getOperation().isLoad());
            assertTrue(!ev.getOperation().isNetSearch());
            assertTrue(!ev.getOperation().isExpiration());
            assertEquals(null, ev.getCallbackArgument());
            assertEquals(true, ev.isCallbackArgumentAvailable());
            assertTrue(!ev.isOriginRemote());
            assertTrue(ev.getOperation().isDistributed());
        }
        // make sure tx local invalidate allows netsearch
        Object localCmtValue = rgn.getEntry("key").getValue();
        txMgr.begin();
        assertSame(localCmtValue, rgn.getEntry("key").getValue());
        rgn.localInvalidate("key");
        assertNull(rgn.getEntry("key").getValue());
        // now make sure a get will do a netsearch and find the value
        // in the other vm instead of the one in local cmt state
        Object txValue = rgn.get("key");
        assertNotSame(localCmtValue, txValue);
        assertSame(txValue, rgn.get("key"));
        assertNotSame(localCmtValue, rgn.getEntry("key").getValue());
        // make sure we did a search and not a load
        assertEquals(localCmtValue, rgn.getEntry("key").getValue());
        // now make sure that if we do a tx distributed invalidate
        // that we will do a load and not a search
        rgn.invalidate("key");
        assertNull(rgn.getEntry("key").getValue());
        txValue = rgn.get("key");
        assertEquals("LV 6", txValue);
        assertSame(txValue, rgn.get("key"));
        assertEquals("LV 6", rgn.getEntry("key").getValue());
        // now make sure after rollback that local cmt state has not changed
        txMgr.rollback();
        assertSame(localCmtValue, rgn.getEntry("key").getValue());
    } catch (Exception e) {
        CacheFactory.getInstance(getSystem()).close();
        getSystem().getLogWriter().fine("testTXUpdateLoadNoConflict: Caused exception in createRegion");
        throw e;
    }
}
Also used : CacheException(org.apache.geode.cache.CacheException) SerializableRunnable(org.apache.geode.test.dunit.SerializableRunnable) TimeoutException(org.apache.geode.cache.TimeoutException) EntryNotFoundException(org.apache.geode.cache.EntryNotFoundException) InvalidDeltaException(org.apache.geode.InvalidDeltaException) IOException(java.io.IOException) CacheException(org.apache.geode.cache.CacheException) EntryExistsException(org.apache.geode.cache.EntryExistsException) CacheWriterException(org.apache.geode.cache.CacheWriterException) IgnoredException(org.apache.geode.test.dunit.IgnoredException) CacheLoaderException(org.apache.geode.cache.CacheLoaderException) CacheTransactionManager(org.apache.geode.cache.CacheTransactionManager) TransactionId(org.apache.geode.cache.TransactionId) LoaderHelper(org.apache.geode.cache.LoaderHelper) AttributesFactory(org.apache.geode.cache.AttributesFactory) TXStateProxy(org.apache.geode.internal.cache.TXStateProxy) CacheLoaderException(org.apache.geode.cache.CacheLoaderException) VM(org.apache.geode.test.dunit.VM) EntryEvent(org.apache.geode.cache.EntryEvent) LocalRegion(org.apache.geode.internal.cache.LocalRegion) PartitionedRegion(org.apache.geode.internal.cache.PartitionedRegion) Region(org.apache.geode.cache.Region) Collection(java.util.Collection) CacheLoader(org.apache.geode.cache.CacheLoader) StoredObject(org.apache.geode.internal.offheap.StoredObject) AttributesMutator(org.apache.geode.cache.AttributesMutator) Ignore(org.junit.Ignore) Test(org.junit.Test) FlakyTest(org.apache.geode.test.junit.categories.FlakyTest)

Aggregations

CacheLoader (org.apache.geode.cache.CacheLoader)40 LoaderHelper (org.apache.geode.cache.LoaderHelper)32 Region (org.apache.geode.cache.Region)24 Test (org.junit.Test)24 AttributesFactory (org.apache.geode.cache.AttributesFactory)21 CacheLoaderException (org.apache.geode.cache.CacheLoaderException)20 CacheException (org.apache.geode.cache.CacheException)18 DistributedTest (org.apache.geode.test.junit.categories.DistributedTest)17 VM (org.apache.geode.test.dunit.VM)16 Host (org.apache.geode.test.dunit.Host)13 CacheWriterException (org.apache.geode.cache.CacheWriterException)9 LocalRegion (org.apache.geode.internal.cache.LocalRegion)9 AttributesMutator (org.apache.geode.cache.AttributesMutator)8 RegionAttributes (org.apache.geode.cache.RegionAttributes)8 TimeoutException (org.apache.geode.cache.TimeoutException)7 SerializableRunnable (org.apache.geode.test.dunit.SerializableRunnable)7 FlakyTest (org.apache.geode.test.junit.categories.FlakyTest)7 HashSet (java.util.HashSet)6 Set (java.util.Set)6 Properties (java.util.Properties)5