Lines 110-124
Link Here
|
110 |
import org.netbeans.modules.parsing.lucene.support.IndexManager; |
110 |
import org.netbeans.modules.parsing.lucene.support.IndexManager; |
111 |
import org.netbeans.modules.parsing.spi.ParseException; |
111 |
import org.netbeans.modules.parsing.spi.ParseException; |
112 |
import org.netbeans.modules.parsing.spi.Parser; |
112 |
import org.netbeans.modules.parsing.spi.Parser; |
113 |
import org.netbeans.modules.parsing.spi.indexing.BinaryIndexer; |
113 |
import org.netbeans.modules.parsing.spi.indexing.*; |
114 |
import org.netbeans.modules.parsing.spi.indexing.BinaryIndexerFactory; |
|
|
115 |
import org.netbeans.modules.parsing.spi.indexing.Context; |
116 |
import org.netbeans.modules.parsing.spi.indexing.CustomIndexer; |
117 |
import org.netbeans.modules.parsing.spi.indexing.CustomIndexerFactory; |
118 |
import org.netbeans.modules.parsing.spi.indexing.EmbeddingIndexer; |
119 |
import org.netbeans.modules.parsing.spi.indexing.EmbeddingIndexerFactory; |
120 |
import org.netbeans.modules.parsing.spi.indexing.Indexable; |
121 |
import org.netbeans.modules.parsing.spi.indexing.SourceIndexerFactory; |
122 |
import org.openide.filesystems.FileChangeAdapter; |
114 |
import org.openide.filesystems.FileChangeAdapter; |
123 |
import org.openide.filesystems.FileChangeListener; |
115 |
import org.openide.filesystems.FileChangeListener; |
124 |
import org.openide.filesystems.FileEvent; |
116 |
import org.openide.filesystems.FileEvent; |
Lines 176-182
Link Here
|
176 |
scannedRoots2Peers, |
168 |
scannedRoots2Peers, |
177 |
sourcesForBinaryRoots, |
169 |
sourcesForBinaryRoots, |
178 |
false, |
170 |
false, |
179 |
suspendSupport, |
171 |
suspendSupport.getSuspendStatus(), |
180 |
LogContext.create(LogContext.EventType.PATH, null)); |
172 |
LogContext.create(LogContext.EventType.PATH, null)); |
181 |
} |
173 |
} |
182 |
} |
174 |
} |
Lines 391-397
Link Here
|
391 |
forceRefresh, |
383 |
forceRefresh, |
392 |
sourcesForBinaryRoots.contains(rootUrl), |
384 |
sourcesForBinaryRoots.contains(rootUrl), |
393 |
steady, |
385 |
steady, |
394 |
suspendSupport, |
386 |
suspendSupport.getSuspendStatus(), |
395 |
logCtx); |
387 |
logCtx); |
396 |
} |
388 |
} |
397 |
} else { |
389 |
} else { |
Lines 402-408
Link Here
|
402 |
checkEditor, |
394 |
checkEditor, |
403 |
forceRefresh, |
395 |
forceRefresh, |
404 |
sourcesForBinaryRoots.contains(rootUrl), |
396 |
sourcesForBinaryRoots.contains(rootUrl), |
405 |
suspendSupport, |
397 |
suspendSupport.getSuspendStatus(), |
406 |
logCtx); |
398 |
logCtx); |
407 |
} |
399 |
} |
408 |
return flw; |
400 |
return flw; |
Lines 424-430
Link Here
|
424 |
if (cifInfos == null) { |
416 |
if (cifInfos == null) { |
425 |
throw new InvalidParameterException("No CustomIndexerFactory with name: '" + indexerName + "'"); //NOI18N |
417 |
throw new InvalidParameterException("No CustomIndexerFactory with name: '" + indexerName + "'"); //NOI18N |
426 |
} else { |
418 |
} else { |
427 |
Work w = new RefreshCifIndices(cifInfos, scannedRoots2Dependencies, sourcesForBinaryRoots, suspendSupport, logCtx); |
419 |
Work w = new RefreshCifIndices(cifInfos, scannedRoots2Dependencies, sourcesForBinaryRoots, suspendSupport.getSuspendStatus(), logCtx); |
428 |
scheduleWork(w, false); |
420 |
scheduleWork(w, false); |
429 |
} |
421 |
} |
430 |
} |
422 |
} |
Lines 453-459
Link Here
|
453 |
logStatistics, |
445 |
logStatistics, |
454 |
filesOrFileObjects == null ? Collections.<Object>emptySet() : Arrays.asList(filesOrFileObjects), |
446 |
filesOrFileObjects == null ? Collections.<Object>emptySet() : Arrays.asList(filesOrFileObjects), |
455 |
fsRefreshInterceptor, |
447 |
fsRefreshInterceptor, |
456 |
suspendSupport, |
448 |
suspendSupport.getSuspendStatus(), |
457 |
logCtx), |
449 |
logCtx), |
458 |
wait); |
450 |
wait); |
459 |
} |
451 |
} |
Lines 541-547
Link Here
|
541 |
scannedRoots2Peers, |
533 |
scannedRoots2Peers, |
542 |
sourcesForBinaryRoots, |
534 |
sourcesForBinaryRoots, |
543 |
!existingPathsChanged, |
535 |
!existingPathsChanged, |
544 |
suspendSupport, |
536 |
suspendSupport.getSuspendStatus(), |
545 |
logContext), |
537 |
logContext), |
546 |
false); |
538 |
false); |
547 |
} |
539 |
} |
Lines 554-560
Link Here
|
554 |
false, |
546 |
false, |
555 |
false, |
547 |
false, |
556 |
sourcesForBinaryRoots.contains(rootUrl), |
548 |
sourcesForBinaryRoots.contains(rootUrl), |
557 |
suspendSupport, |
549 |
suspendSupport.getSuspendStatus(), |
558 |
logContext), |
550 |
logContext), |
559 |
false); |
551 |
false); |
560 |
} |
552 |
} |
Lines 662-668
Link Here
|
662 |
scannedRoots2Peers, |
654 |
scannedRoots2Peers, |
663 |
sourcesForBinaryRoots, |
655 |
sourcesForBinaryRoots, |
664 |
false, |
656 |
false, |
665 |
suspendSupport, |
657 |
suspendSupport.getSuspendStatus(), |
666 |
LogContext.create(LogContext.EventType.FILE, null)); |
658 |
LogContext.create(LogContext.EventType.FILE, null)); |
667 |
} else { |
659 |
} else { |
668 |
//Already seen files work is enough |
660 |
//Already seen files work is enough |
Lines 677-683
Link Here
|
677 |
true, |
669 |
true, |
678 |
sourcForBinaryRoot, |
670 |
sourcForBinaryRoot, |
679 |
true, |
671 |
true, |
680 |
suspendSupport, |
672 |
suspendSupport.getSuspendStatus(), |
681 |
LogContext.create(LogContext.EventType.FILE, null)); |
673 |
LogContext.create(LogContext.EventType.FILE, null)); |
682 |
} else { |
674 |
} else { |
683 |
//If no children nothing needs to be done - save some CPU time |
675 |
//If no children nothing needs to be done - save some CPU time |
Lines 694-700
Link Here
|
694 |
true, |
686 |
true, |
695 |
sourcForBinaryRoot, |
687 |
sourcForBinaryRoot, |
696 |
true, |
688 |
true, |
697 |
suspendSupport, |
689 |
suspendSupport.getSuspendStatus(), |
698 |
LogContext.create(LogContext.EventType.FILE, null)); |
690 |
LogContext.create(LogContext.EventType.FILE, null)); |
699 |
} |
691 |
} |
700 |
if (wrk != null) { |
692 |
if (wrk != null) { |
Lines 710-716
Link Here
|
710 |
if (root != null && isVisible(fo, root.second)) { |
702 |
if (root != null && isVisible(fo, root.second)) { |
711 |
final Work wrk = new BinaryWork( |
703 |
final Work wrk = new BinaryWork( |
712 |
root.first, |
704 |
root.first, |
713 |
suspendSupport, |
705 |
suspendSupport.getSuspendStatus(), |
714 |
LogContext.create(LogContext.EventType.FILE, null)); |
706 |
LogContext.create(LogContext.EventType.FILE, null)); |
715 |
eventQueue.record(FileEventLog.FileOp.CREATE, root.first, null, fe, wrk); |
707 |
eventQueue.record(FileEventLog.FileOp.CREATE, root.first, null, fe, wrk); |
716 |
processed = true; |
708 |
processed = true; |
Lines 754-760
Link Here
|
754 |
true, |
746 |
true, |
755 |
sourceForBinaryRoot, |
747 |
sourceForBinaryRoot, |
756 |
true, |
748 |
true, |
757 |
suspendSupport, |
749 |
suspendSupport.getSuspendStatus(), |
758 |
LogContext.create(LogContext.EventType.FILE, null)); |
750 |
LogContext.create(LogContext.EventType.FILE, null)); |
759 |
eventQueue.record(FileEventLog.FileOp.CREATE, root.first, FileUtil.getRelativePath(root.second, fo), fe, wrk); |
751 |
eventQueue.record(FileEventLog.FileOp.CREATE, root.first, FileUtil.getRelativePath(root.second, fo), fe, wrk); |
760 |
processed = true; |
752 |
processed = true; |
Lines 767-773
Link Here
|
767 |
if (root != null && isVisible(fo,root.second)) { |
759 |
if (root != null && isVisible(fo,root.second)) { |
768 |
final Work wrk = new BinaryWork( |
760 |
final Work wrk = new BinaryWork( |
769 |
root.first, |
761 |
root.first, |
770 |
suspendSupport, |
762 |
suspendSupport.getSuspendStatus(), |
771 |
LogContext.create(LogContext.EventType.FILE, null)); |
763 |
LogContext.create(LogContext.EventType.FILE, null)); |
772 |
eventQueue.record(FileEventLog.FileOp.CREATE, root.first, null, fe, wrk); |
764 |
eventQueue.record(FileEventLog.FileOp.CREATE, root.first, null, fe, wrk); |
773 |
processed = true; |
765 |
processed = true; |
Lines 816-822
Link Here
|
816 |
final Work wrk = new DeleteWork( |
808 |
final Work wrk = new DeleteWork( |
817 |
root.first, |
809 |
root.first, |
818 |
Collections.singleton(relativePath), |
810 |
Collections.singleton(relativePath), |
819 |
suspendSupport, |
811 |
suspendSupport.getSuspendStatus(), |
820 |
LogContext.create(LogContext.EventType.FILE, null)); |
812 |
LogContext.create(LogContext.EventType.FILE, null)); |
821 |
eventQueue.record(FileEventLog.FileOp.DELETE, root.first, relativePath, fe, wrk); |
813 |
eventQueue.record(FileEventLog.FileOp.DELETE, root.first, relativePath, fe, wrk); |
822 |
processed = true; |
814 |
processed = true; |
Lines 833-839
Link Here
|
833 |
if (root != null && isVisible(fo, root.second)) { |
825 |
if (root != null && isVisible(fo, root.second)) { |
834 |
final Work wrk = new BinaryWork( |
826 |
final Work wrk = new BinaryWork( |
835 |
root.first, |
827 |
root.first, |
836 |
suspendSupport, |
828 |
suspendSupport.getSuspendStatus(), |
837 |
LogContext.create(LogContext.EventType.FILE, null)); |
829 |
LogContext.create(LogContext.EventType.FILE, null)); |
838 |
eventQueue.record(FileEventLog.FileOp.DELETE, root.first, null, fe, wrk); |
830 |
eventQueue.record(FileEventLog.FileOp.DELETE, root.first, null, fe, wrk); |
839 |
processed = true; |
831 |
processed = true; |
Lines 879-885
Link Here
|
879 |
final Work work = new DeleteWork( |
871 |
final Work work = new DeleteWork( |
880 |
root.first, |
872 |
root.first, |
881 |
Collections.singleton(oldFilePath), |
873 |
Collections.singleton(oldFilePath), |
882 |
suspendSupport, |
874 |
suspendSupport.getSuspendStatus(), |
883 |
LogContext.create(LogContext.EventType.FILE, null)); |
875 |
LogContext.create(LogContext.EventType.FILE, null)); |
884 |
eventQueue.record(FileEventLog.FileOp.DELETE, root.first, oldFilePath, fe, work); |
876 |
eventQueue.record(FileEventLog.FileOp.DELETE, root.first, oldFilePath, fe, work); |
885 |
} else { |
877 |
} else { |
Lines 889-895
Link Here
|
889 |
final Work work = new DeleteWork( |
881 |
final Work work = new DeleteWork( |
890 |
root.first, |
882 |
root.first, |
891 |
oldFilePaths, |
883 |
oldFilePaths, |
892 |
suspendSupport, |
884 |
suspendSupport.getSuspendStatus(), |
893 |
LogContext.create(LogContext.EventType.FILE, null)); |
885 |
LogContext.create(LogContext.EventType.FILE, null)); |
894 |
eventQueue.record(FileEventLog.FileOp.DELETE, root.first, path, fe, work); |
886 |
eventQueue.record(FileEventLog.FileOp.DELETE, root.first, path, fe, work); |
895 |
} |
887 |
} |
Lines 908-914
Link Here
|
908 |
true, |
900 |
true, |
909 |
sourceForBinaryRoot, |
901 |
sourceForBinaryRoot, |
910 |
true, |
902 |
true, |
911 |
suspendSupport, |
903 |
suspendSupport.getSuspendStatus(), |
912 |
LogContext.create(LogContext.EventType.FILE, null)); |
904 |
LogContext.create(LogContext.EventType.FILE, null)); |
913 |
eventQueue.record(FileEventLog.FileOp.CREATE, root.first, FileUtil.getRelativePath(rootFo, newFile), fe,flw); |
905 |
eventQueue.record(FileEventLog.FileOp.CREATE, root.first, FileUtil.getRelativePath(rootFo, newFile), fe,flw); |
914 |
} |
906 |
} |
Lines 930-936
Link Here
|
930 |
null, |
922 |
null, |
931 |
fe, |
923 |
fe, |
932 |
new BinaryWork(oldBinaryRoot, |
924 |
new BinaryWork(oldBinaryRoot, |
933 |
suspendSupport, |
925 |
suspendSupport.getSuspendStatus(), |
934 |
LogContext.create(LogContext.EventType.FILE, null))); //NOI18N |
926 |
LogContext.create(LogContext.EventType.FILE, null))); //NOI18N |
935 |
} catch (MalformedURLException mue) { |
927 |
} catch (MalformedURLException mue) { |
936 |
LOGGER.log(Level.WARNING, null, mue); |
928 |
LOGGER.log(Level.WARNING, null, mue); |
Lines 943-949
Link Here
|
943 |
null, |
935 |
null, |
944 |
fe, |
936 |
fe, |
945 |
new BinaryWork(root.first, |
937 |
new BinaryWork(root.first, |
946 |
suspendSupport, |
938 |
suspendSupport.getSuspendStatus(), |
947 |
LogContext.create(LogContext.EventType.FILE, null))); |
939 |
LogContext.create(LogContext.EventType.FILE, null))); |
948 |
processed = true; |
940 |
processed = true; |
949 |
} |
941 |
} |
Lines 977-983
Link Here
|
977 |
changedIndexers, |
969 |
changedIndexers, |
978 |
scannedRoots2Dependencies, |
970 |
scannedRoots2Dependencies, |
979 |
sourcesForBinaryRoots, |
971 |
sourcesForBinaryRoots, |
980 |
suspendSupport, |
972 |
suspendSupport.getSuspendStatus(), |
981 |
LogContext.create(LogContext.EventType.INDEXER,null)), |
973 |
LogContext.create(LogContext.EventType.INDEXER,null)), |
982 |
false); |
974 |
false); |
983 |
} |
975 |
} |
Lines 990-996
Link Here
|
990 |
changedIndexers, |
982 |
changedIndexers, |
991 |
scannedRoots2Dependencies, |
983 |
scannedRoots2Dependencies, |
992 |
sourcesForBinaryRoots, |
984 |
sourcesForBinaryRoots, |
993 |
suspendSupport, |
985 |
suspendSupport.getSuspendStatus(), |
994 |
LogContext.create(LogContext.EventType.INDEXER, null)), |
986 |
LogContext.create(LogContext.EventType.INDEXER, null)), |
995 |
false); |
987 |
false); |
996 |
} |
988 |
} |
Lines 1096-1102
Link Here
|
1096 |
true, |
1088 |
true, |
1097 |
sourcesForBinaryRoots.contains(root.first), |
1089 |
sourcesForBinaryRoots.contains(root.first), |
1098 |
true, |
1090 |
true, |
1099 |
suspendSupport, |
1091 |
suspendSupport.getSuspendStatus(), |
1100 |
LogContext.create(LogContext.EventType.FILE, null)); |
1092 |
LogContext.create(LogContext.EventType.FILE, null)); |
1101 |
jobs.put(root.first, job); |
1093 |
jobs.put(root.first, job); |
1102 |
} else { |
1094 |
} else { |
Lines 1315-1322
Link Here
|
1315 |
for(IndexerCache.IndexerInfo<CustomIndexerFactory> info : cifInfos) { |
1307 |
for(IndexerCache.IndexerInfo<CustomIndexerFactory> info : cifInfos) { |
1316 |
try { |
1308 |
try { |
1317 |
CustomIndexerFactory factory = info.getIndexerFactory(); |
1309 |
CustomIndexerFactory factory = info.getIndexerFactory(); |
1318 |
Context ctx = SPIAccessor.getInstance().createContext(CacheFolder.getDataFolder(root.first), root.first, |
1310 |
Context ctx = SPIAccessor.getInstance().createContext( |
1319 |
factory.getIndexerName(), factory.getIndexVersion(), null, false, true, false, null); |
1311 |
CacheFolder.getDataFolder(root.first), |
|
|
1312 |
root.first, |
1313 |
factory.getIndexerName(), |
1314 |
factory.getIndexVersion(), |
1315 |
null, |
1316 |
false, |
1317 |
true, |
1318 |
false, |
1319 |
SuspendSupport.NOP, |
1320 |
null, |
1321 |
null); |
1320 |
factory.filesDirty(dirty, ctx); |
1322 |
factory.filesDirty(dirty, ctx); |
1321 |
} catch (IOException ex) { |
1323 |
} catch (IOException ex) { |
1322 |
LOGGER.log(Level.WARNING, null, ex); |
1324 |
LOGGER.log(Level.WARNING, null, ex); |
Lines 1327-1334
Link Here
|
1327 |
for(IndexerCache.IndexerInfo<EmbeddingIndexerFactory> info : eifInfos) { |
1329 |
for(IndexerCache.IndexerInfo<EmbeddingIndexerFactory> info : eifInfos) { |
1328 |
try { |
1330 |
try { |
1329 |
EmbeddingIndexerFactory factory = info.getIndexerFactory(); |
1331 |
EmbeddingIndexerFactory factory = info.getIndexerFactory(); |
1330 |
Context ctx = SPIAccessor.getInstance().createContext(CacheFolder.getDataFolder(root.first), root.first, |
1332 |
Context ctx = SPIAccessor.getInstance().createContext( |
1331 |
factory.getIndexerName(), factory.getIndexVersion(), null, false, true, false, null); |
1333 |
CacheFolder.getDataFolder(root.first), |
|
|
1334 |
root.first, |
1335 |
factory.getIndexerName(), |
1336 |
factory.getIndexVersion(), |
1337 |
null, |
1338 |
false, |
1339 |
true, |
1340 |
false, |
1341 |
SuspendSupport.NOP, |
1342 |
null, |
1343 |
null); |
1332 |
factory.filesDirty(dirty, ctx); |
1344 |
factory.filesDirty(dirty, ctx); |
1333 |
} catch (IOException ex) { |
1345 |
} catch (IOException ex) { |
1334 |
LOGGER.log(Level.WARNING, null, ex); |
1346 |
LOGGER.log(Level.WARNING, null, ex); |
Lines 1391-1397
Link Here
|
1391 |
scannedRoots2Peers, |
1403 |
scannedRoots2Peers, |
1392 |
sourcesForBinaryRoots, |
1404 |
sourcesForBinaryRoots, |
1393 |
true, |
1405 |
true, |
1394 |
suspendSupport, |
1406 |
suspendSupport.getSuspendStatus(), |
1395 |
work == null ? |
1407 |
work == null ? |
1396 |
LogContext.create(LogContext.EventType.PATH, null) |
1408 |
LogContext.create(LogContext.EventType.PATH, null) |
1397 |
: work.getLogContext()), false); |
1409 |
: work.getLogContext()), false); |
Lines 2095-2102
Link Here
|
2095 |
final Pair<String,Integer> key = Pair.of(factory.getIndexerName(),factory.getIndexVersion()); |
2107 |
final Pair<String,Integer> key = Pair.of(factory.getIndexerName(),factory.getIndexVersion()); |
2096 |
Pair<SourceIndexerFactory,Context> value = ctxToFinish.get(key); |
2108 |
Pair<SourceIndexerFactory,Context> value = ctxToFinish.get(key); |
2097 |
if (value == null) { |
2109 |
if (value == null) { |
2098 |
final Context ctx = SPIAccessor.getInstance().createContext(cacheRoot, root, factory.getIndexerName(), factory.getIndexVersion(), null, |
2110 |
final Context ctx = SPIAccessor.getInstance().createContext( |
2099 |
followUpJob, checkEditor, sourceForBinaryRoot, getShuttdownRequest()); |
2111 |
cacheRoot, |
|
|
2112 |
root, |
2113 |
factory.getIndexerName(), |
2114 |
factory.getIndexVersion(), |
2115 |
null, |
2116 |
followUpJob, |
2117 |
checkEditor, |
2118 |
sourceForBinaryRoot, |
2119 |
getSuspendStatus(), |
2120 |
getShuttdownRequest(), |
2121 |
null); |
2100 |
value = Pair.<SourceIndexerFactory,Context>of(factory,ctx); |
2122 |
value = Pair.<SourceIndexerFactory,Context>of(factory,ctx); |
2101 |
ctxToFinish.put(key,value); |
2123 |
ctxToFinish.put(key,value); |
2102 |
} |
2124 |
} |
Lines 2124-2131
Link Here
|
2124 |
final Pair<String,Integer> key = Pair.of(eif.getIndexerName(), eif.getIndexVersion()); |
2146 |
final Pair<String,Integer> key = Pair.of(eif.getIndexerName(), eif.getIndexVersion()); |
2125 |
Pair<SourceIndexerFactory,Context> value = ctxToFinish.get(key); |
2147 |
Pair<SourceIndexerFactory,Context> value = ctxToFinish.get(key); |
2126 |
if (value == null) { |
2148 |
if (value == null) { |
2127 |
final Context context = SPIAccessor.getInstance().createContext(cacheRoot, root, eif.getIndexerName(), eif.getIndexVersion(), null, |
2149 |
final Context context = SPIAccessor.getInstance().createContext( |
2128 |
followUpJob, checkEditor, sourceForBinaryRoot, null); |
2150 |
cacheRoot, |
|
|
2151 |
root, |
2152 |
eif.getIndexerName(), |
2153 |
eif.getIndexVersion(), |
2154 |
null, |
2155 |
followUpJob, |
2156 |
checkEditor, |
2157 |
sourceForBinaryRoot, |
2158 |
getSuspendStatus(), |
2159 |
getShuttdownRequest(), |
2160 |
null); |
2129 |
value = Pair.<SourceIndexerFactory,Context>of(eif,context); |
2161 |
value = Pair.<SourceIndexerFactory,Context>of(eif,context); |
2130 |
ctxToFinish.put(key, value); |
2162 |
ctxToFinish.put(key, value); |
2131 |
} |
2163 |
} |
Lines 2284-2290
Link Here
|
2284 |
final Pair<String,Integer> key = Pair.of(factory.getIndexerName(),factory.getIndexVersion()); |
2316 |
final Pair<String,Integer> key = Pair.of(factory.getIndexerName(),factory.getIndexVersion()); |
2285 |
Pair<SourceIndexerFactory,Context> value = contexts.get(key); |
2317 |
Pair<SourceIndexerFactory,Context> value = contexts.get(key); |
2286 |
if (value == null) { |
2318 |
if (value == null) { |
2287 |
final Context ctx = SPIAccessor.getInstance().createContext(cacheRoot, root, factory.getIndexerName(), factory.getIndexVersion(), null, followUpJob, checkEditor, sourceForBinaryRoot, getShuttdownRequest()); |
2319 |
final Context ctx = SPIAccessor.getInstance().createContext( |
|
|
2320 |
cacheRoot, |
2321 |
root, |
2322 |
factory.getIndexerName(), |
2323 |
factory.getIndexVersion(), |
2324 |
null, |
2325 |
followUpJob, |
2326 |
checkEditor, |
2327 |
sourceForBinaryRoot, |
2328 |
getSuspendStatus(), |
2329 |
getShuttdownRequest(), |
2330 |
null); |
2288 |
value = Pair.<SourceIndexerFactory,Context>of(factory,ctx); |
2331 |
value = Pair.<SourceIndexerFactory,Context>of(factory,ctx); |
2289 |
contexts.put(key,value); |
2332 |
contexts.put(key,value); |
2290 |
} |
2333 |
} |
Lines 2383-2389
Link Here
|
2383 |
final Pair<String,Integer> key = Pair.of(factory.getIndexerName(),factory.getIndexVersion()); |
2426 |
final Pair<String,Integer> key = Pair.of(factory.getIndexerName(),factory.getIndexVersion()); |
2384 |
Pair<SourceIndexerFactory,Context> value = contexts.get(key); |
2427 |
Pair<SourceIndexerFactory,Context> value = contexts.get(key); |
2385 |
if (value == null) { |
2428 |
if (value == null) { |
2386 |
final Context ctx = SPIAccessor.getInstance().createContext(cacheRoot, root, factory.getIndexerName(), factory.getIndexVersion(), null, followUpJob, checkEditor, sourceForBinaryRoot, getShuttdownRequest()); |
2429 |
final Context ctx = SPIAccessor.getInstance().createContext( |
|
|
2430 |
cacheRoot, |
2431 |
root, |
2432 |
factory.getIndexerName(), |
2433 |
factory.getIndexVersion(), |
2434 |
null, |
2435 |
followUpJob, |
2436 |
checkEditor, |
2437 |
sourceForBinaryRoot, |
2438 |
getSuspendStatus(), |
2439 |
getShuttdownRequest(), |
2440 |
null); |
2387 |
value = Pair.<SourceIndexerFactory,Context>of(factory,ctx); |
2441 |
value = Pair.<SourceIndexerFactory,Context>of(factory,ctx); |
2388 |
contexts.put(key,value); |
2442 |
contexts.put(key,value); |
2389 |
} |
2443 |
} |
Lines 2482-2489
Link Here
|
2482 |
final FileObject cacheRoot = CacheFolder.getDataFolder(root); |
2536 |
final FileObject cacheRoot = CacheFolder.getDataFolder(root); |
2483 |
for(BinaryIndexerFactory bif : indexers.bifs) { |
2537 |
for(BinaryIndexerFactory bif : indexers.bifs) { |
2484 |
final Context ctx = SPIAccessor.getInstance().createContext( |
2538 |
final Context ctx = SPIAccessor.getInstance().createContext( |
2485 |
cacheRoot, root, bif.getIndexerName(), bif.getIndexVersion(), null, false, false, |
2539 |
cacheRoot, |
2486 |
false, getShuttdownRequest()); |
2540 |
root, |
|
|
2541 |
bif.getIndexerName(), |
2542 |
bif.getIndexVersion(), |
2543 |
null, |
2544 |
false, |
2545 |
false, |
2546 |
false, |
2547 |
getSuspendStatus(), |
2548 |
getShuttdownRequest(), |
2549 |
null); |
2487 |
contexts.put(bif, ctx); |
2550 |
contexts.put(bif, ctx); |
2488 |
} |
2551 |
} |
2489 |
} |
2552 |
} |
Lines 2630-2636
Link Here
|
2630 |
final Pair<String,Integer> key = Pair.of(indexerName,indexerVersion); |
2693 |
final Pair<String,Integer> key = Pair.of(indexerName,indexerVersion); |
2631 |
Pair<SourceIndexerFactory,Context> value = transactionContexts.get(key); |
2694 |
Pair<SourceIndexerFactory,Context> value = transactionContexts.get(key); |
2632 |
if (value == null) { |
2695 |
if (value == null) { |
2633 |
final Context context = SPIAccessor.getInstance().createContext(cache, rootURL, indexerName, indexerVersion, null, followUpJob, checkEditor, sourceForBinaryRoot, null); |
2696 |
final Context context = SPIAccessor.getInstance().createContext( |
|
|
2697 |
cache, |
2698 |
rootURL, |
2699 |
indexerName, |
2700 |
indexerVersion, |
2701 |
null, |
2702 |
followUpJob, |
2703 |
checkEditor, |
2704 |
sourceForBinaryRoot, |
2705 |
getSuspendStatus(), |
2706 |
getShuttdownRequest(), |
2707 |
null); |
2634 |
value = Pair.<SourceIndexerFactory,Context>of(indexerFactory,context); |
2708 |
value = Pair.<SourceIndexerFactory,Context>of(indexerFactory,context); |
2635 |
transactionContexts.put(key,value); |
2709 |
transactionContexts.put(key,value); |
2636 |
} |
2710 |
} |