Package org.apache.jackrabbit.core.data.util

Examples of org.apache.jackrabbit.core.data.util.NamedThreadFactory


            ObjectListing prevObjectListing = s3service.listObjects(bucket,
                KEY_PREFIX);
            List<DeleteObjectsRequest.KeyVersion> deleteList = new ArrayList<DeleteObjectsRequest.KeyVersion>();
            int nThreads = Integer.parseInt(properties.getProperty("maxConnections"));
            ExecutorService executor = Executors.newFixedThreadPool(nThreads,
                new NamedThreadFactory("s3-object-rename-worker"));
            boolean taskAdded = false;
            while (true) {
                for (S3ObjectSummary s3ObjSumm : prevObjectListing.getObjectSummaries()) {
                    executor.execute(new KeyRenameThread(s3ObjSumm.getKey()));
                    taskAdded = true;
View Full Code Here


        void upload() throws DataStoreException {
            long startTime = System.currentTimeMillis();
            LOG.info(" Uploading [{}] using [{}] threads.", files.size(), threads);
            ExecutorService executor = Executors.newFixedThreadPool(threads,
                new NamedThreadFactory("backend-file-upload-worker"));
            int partitionSize = files.size() / (threads);
            int startIndex = 0;
            int endIndex = partitionSize;
            for (int i = 1; i <= threads; i++) {
                List<File> partitionFileList = Collections.unmodifiableList(files.subList(
View Full Code Here

                String key = "a" + i;
                byteMap.put(key, data);
                cache.store(key, new ByteArrayInputStream(byteMap.get(key)));
            }
            ExecutorService executor = Executors.newFixedThreadPool(10,
                new NamedThreadFactory("localcache-store-worker"));
            cache = new LocalCache(CACHE_DIR, TEMP_DIR, 10000000, 0.95, 0.70,
                pendingFiles);
            executor.execute(new StoreWorker(cache, byteMap));
            executor.shutdown();
            while (!executor.awaitTermination(15, TimeUnit.SECONDS)) {
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.core.data.util.NamedThreadFactory

Copyright © 2018 www.massapicom. 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.