Examples of LDCachingKiWiSailConnection


Examples of org.apache.marmotta.ldcache.backend.kiwi.sail.LDCachingKiWiSailConnection

     * @return a repository connection that can be used for storing retrieved triples for caching
     */
    @Override
    public LDCachingConnection getCacheConnection(String resource) throws RepositoryException {
        try {
            LDCachingKiWiSailConnection sailConnection = sail.getConnection();

            return new LDCachingSailRepositoryConnection(repository,sailConnection,cacheContext);
        } catch (SailException e) {
            throw new RepositoryException(e);
        }
View Full Code Here

Examples of org.apache.marmotta.ldcache.backend.kiwi.sail.LDCachingKiWiSailConnection

     * @return
     */
    @Override
    public CloseableIteration<CacheEntry, RepositoryException> listExpiredEntries()  throws RepositoryException {
        try {
            final LDCachingKiWiSailConnection sailConnection = sail.getConnection();
            sailConnection.begin();

            return new ExceptionConvertingIteration<CacheEntry, RepositoryException>(sailConnection.listExpired()) {
                @Override
                protected RepositoryException convert(Exception e) {
                    return new RepositoryException(e);
                }

                /**
                 * Closes this Iteration as well as the wrapped Iteration if it happens to be
                 * a {@link info.aduna.iteration.CloseableIteration}.
                 */
                @Override
                protected void handleClose() throws RepositoryException {
                    super.handleClose();
                    try {
                        sailConnection.commit();
                        sailConnection.close();
                    } catch (SailException ex) {
                        throw new RepositoryException(ex);
                    }
                }
            };
View Full Code Here

Examples of org.apache.marmotta.ldcache.backend.kiwi.sail.LDCachingKiWiSailConnection

     * @return
     */
    @Override
    public CloseableIteration<CacheEntry, RepositoryException> listCacheEntries()  throws RepositoryException {
        try {
            final LDCachingKiWiSailConnection sailConnection = sail.getConnection();
            sailConnection.begin();

            return new ExceptionConvertingIteration<CacheEntry, RepositoryException>(sailConnection.listAll()) {
                @Override
                protected RepositoryException convert(Exception e) {
                    return new RepositoryException(e);
                }

                /**
                 * Closes this Iteration as well as the wrapped Iteration if it happens to be
                 * a {@link info.aduna.iteration.CloseableIteration}.
                 */
                @Override
                protected void handleClose() throws RepositoryException {
                    super.handleClose();
                    try {
                        sailConnection.commit();
                        sailConnection.close();
                    } catch (SailException ex) {
                        throw new RepositoryException(ex);
                    }
                }
            };
View Full Code Here

Examples of org.apache.marmotta.ldcache.backend.kiwi.sail.LDCachingKiWiSailConnection

     * @return a repository connection that can be used for storing retrieved triples for caching
     */
    @Override
    public LDCachingConnection getCacheConnection(String resource) throws RepositoryException {
        try {
            LDCachingKiWiSailConnection sailConnection = sail.getConnection();

            return new LDCachingSailRepositoryConnection(repository,sailConnection,cacheContext);
        } catch (SailException e) {
            throw new RepositoryException(e);
        }
View Full Code Here

Examples of org.apache.marmotta.ldcache.backend.kiwi.sail.LDCachingKiWiSailConnection

     * @return
     */
    @Override
    public CloseableIteration<CacheEntry, RepositoryException> listExpiredEntries()  throws RepositoryException {
        try {
            final LDCachingKiWiSailConnection sailConnection = sail.getConnection();
            sailConnection.begin();

            return new ExceptionConvertingIteration<CacheEntry, RepositoryException>(sailConnection.listExpired()) {
                @Override
                protected RepositoryException convert(Exception e) {
                    return new RepositoryException(e);
                }

                /**
                 * Closes this Iteration as well as the wrapped Iteration if it happens to be
                 * a {@link info.aduna.iteration.CloseableIteration}.
                 */
                @Override
                protected void handleClose() throws RepositoryException {
                    super.handleClose();
                    try {
                        sailConnection.commit();
                        sailConnection.close();
                    } catch (SailException ex) {
                        throw new RepositoryException(ex);
                    }
                }
            };
View Full Code Here

Examples of org.apache.marmotta.ldcache.backend.kiwi.sail.LDCachingKiWiSailConnection

     * @return
     */
    @Override
    public CloseableIteration<CacheEntry, RepositoryException> listCacheEntries()  throws RepositoryException {
        try {
            final LDCachingKiWiSailConnection sailConnection = sail.getConnection();
            sailConnection.begin();

            return new ExceptionConvertingIteration<CacheEntry, RepositoryException>(sailConnection.listAll()) {
                @Override
                protected RepositoryException convert(Exception e) {
                    return new RepositoryException(e);
                }

                /**
                 * Closes this Iteration as well as the wrapped Iteration if it happens to be
                 * a {@link info.aduna.iteration.CloseableIteration}.
                 */
                @Override
                protected void handleClose() throws RepositoryException {
                    super.handleClose();
                    try {
                        sailConnection.commit();
                        sailConnection.close();
                    } catch (SailException ex) {
                        throw new RepositoryException(ex);
                    }
                }
            };
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.