Examples of removeCacheEntry()


Examples of org.apache.marmotta.ldcache.api.LDCachingConnection.removeCacheEntry()

                CacheEntry entry = con.getCacheEntry(resource);
                if(entry.getExpiryDate().getTime() > now.getTime()) {
                    entry.setExpiryDate(now);

                    con.removeCacheEntry(entry.getResource());
                    con.addCacheEntry(entry.getResource(),entry);
                }

                con.commit();
            } catch(RepositoryException ex) {
View Full Code Here

Examples of org.apache.marmotta.ldcache.api.LDCachingConnection.removeCacheEntry()

                        } else {
                            newEntry.setUpdateCount(1);
                        }
                        newEntry.setTripleCount(count);

                        cacheConnection1.removeCacheEntry(resource);
                        cacheConnection1.addCacheEntry(resource, newEntry);
                        cacheConnection1.commit();
                    } catch (RepositoryException e) {
                        log.error("repository error while refreshing the remote resource {} from the Linked Data Cloud", resource, e);
                        cacheConnection1.rollback();
View Full Code Here

Examples of org.apache.marmotta.ldcache.api.LDCachingConnection.removeCacheEntry()

                newEntry.setTripleCount(0);

                LDCachingConnection cacheConnection2 = backend.getCacheConnection(resource.stringValue());
                cacheConnection2.begin();
                try {
                    cacheConnection2.removeCacheEntry(resource);
                    cacheConnection2.addCacheEntry(resource, newEntry);

                    cacheConnection2.commit();
                    log.error("refreshing the remote resource {} from the Linked Data Cloud failed ({})",resource,e.getMessage());
                    //log.info("exception was:",e);
View Full Code Here

Examples of org.apache.marmotta.ldcache.api.LDCachingConnection.removeCacheEntry()

                        try {
                            LDCachingConnection con = backend.getCacheConnection(next.getResource().stringValue());
                            try {
                                con.begin();

                                con.removeCacheEntry(next.getResource());
                                con.addCacheEntry(next.getResource(), next);

                                con.commit();
                            } catch(RepositoryException ex) {
                                con.rollback();
View Full Code Here

Examples of org.apache.marmotta.ldcache.api.LDCachingConnection.removeCacheEntry()

            Assert.assertTrue(backend.isCached(subject2.stringValue()));
            Assert.assertEquals(2,asList(backend.listCacheEntries()).size());
            Assert.assertEquals(1,asList(backend.listExpiredEntries()).size());

            con.begin();
            con.removeCacheEntry(subject1);
            con.commit();

            Assert.assertFalse(backend.isCached(subject1.stringValue()));
            Assert.assertTrue(backend.isCached(subject2.stringValue()));
            Assert.assertEquals(1,asList(backend.listCacheEntries()).size());
View Full Code Here

Examples of org.apache.marmotta.ldcache.api.LDCachingConnection.removeCacheEntry()

            Assert.assertTrue(backend.isCached(subject2.stringValue()));
            Assert.assertEquals(2,asList(backend.listCacheEntries()).size());
            Assert.assertEquals(1,asList(backend.listExpiredEntries()).size());

            con.begin();
            con.removeCacheEntry(subject1);
            con.commit();

            Assert.assertFalse(backend.isCached(subject1.stringValue()));
            Assert.assertTrue(backend.isCached(subject2.stringValue()));
            Assert.assertEquals(1,asList(backend.listCacheEntries()).size());
View Full Code Here

Examples of org.apache.marmotta.ldcache.api.LDCachingConnection.removeCacheEntry()

                CacheEntry entry = con.getCacheEntry(resource);
                if(entry.getExpiryDate().getTime() > now.getTime()) {
                    entry.setExpiryDate(now);

                    con.removeCacheEntry(entry.getResource());
                    con.addCacheEntry(entry.getResource(),entry);
                }

                con.commit();
            } catch(RepositoryException ex) {
View Full Code Here

Examples of org.apache.marmotta.ldcache.api.LDCachingConnection.removeCacheEntry()

            Assert.assertEquals(2,asList(backend.listCacheEntries()).size());
            Assert.assertEquals(1,asList(backend.listExpiredEntries()).size());

            con.begin();
            con.removeCacheEntry(subject1);
            con.commit();

            Assert.assertEquals(1,asList(backend.listCacheEntries()).size());
            Assert.assertEquals(1,asList(backend.listExpiredEntries()).size());
        } catch(RepositoryException ex) {
View Full Code Here

Examples of org.apache.marmotta.ldcache.api.LDCachingConnection.removeCacheEntry()

                            newEntry.setUpdateCount(entry.getUpdateCount()+1);
                        } else {
                            newEntry.setUpdateCount(1);
                        }

                        cacheConnection1.removeCacheEntry(resource);
                        cacheConnection1.addCacheEntry(resource, newEntry);
                        cacheConnection1.commit();
                    } catch (RepositoryException e) {
                        log.error("repository error while refreshing the remote resource {} from the Linked Data Cloud", resource, e);
                        cacheConnection1.rollback();
View Full Code Here

Examples of org.apache.marmotta.ldcache.api.LDCachingConnection.removeCacheEntry()

                }

                LDCachingConnection cacheConnection2 = backend.getCacheConnection(resource.stringValue());
                cacheConnection2.begin();
                try {
                    cacheConnection2.removeCacheEntry(resource);
                    cacheConnection2.addCacheEntry(resource, newEntry);

                    cacheConnection2.commit();
                    log.error("refreshing the remote resource {} from the Linked Data Cloud failed ({})",resource,e.getMessage());
                    //log.info("exception was:",e);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.