DirectoryFactory implements LuceneIndexFactory { protected static String clusterIdOf(File file) { return file.getParentFile().getParentFile().getName() + CLUSTER_ID_SEGMENT_SEPARATOR + file.getParentFile().getName() + CLUSTER_ID_SEGMENT_SEPARATOR + file.getName(); } DirectoryFactory(final DirectoryType type,
                            final Analyzer analyzer);  DirectoryFactory(final DirectoryType type,
                            final Analyzer analyzer,
                            final File hostingDir); static File defaultHostingDir(); @Override LuceneIndex newCluster(final KCluster kcluster); @Override void remove(KCluster cluster); @Override Map<? extends KCluster, ? extends LuceneIndex> getIndexes(); @Override synchronized void dispose(); static final String CLUSTER_ID_SEGMENT_SEPARATOR; }
@Test public void testClusterIdOf() { String clusterId = DirectoryFactory.clusterIdOf(masterBranchDir); assertThat(clusterId).isEqualTo("myteam/myproject/master"); }