Skip to content

Commit

Permalink
Checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
craigtaverner authored and burqen committed Jun 28, 2018
1 parent ea6160a commit c5a7772
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
Expand Up @@ -189,7 +189,7 @@ static class PartAccessor extends NativeIndexAccessor<SpatialIndexKey,NativeInde
RecoveryCleanupWorkCollector recoveryCleanupWorkCollector, IndexProvider.Monitor monitor, StoreIndexDescriptor descriptor, RecoveryCleanupWorkCollector recoveryCleanupWorkCollector, IndexProvider.Monitor monitor, StoreIndexDescriptor descriptor,
IndexSamplingConfig samplingConfig, SpaceFillingCurveConfiguration searchConfiguration ) throws IOException IndexSamplingConfig samplingConfig, SpaceFillingCurveConfiguration searchConfiguration ) throws IOException
{ {
super( pageCache, fs, fileLayout.spatialFile.indexFile, fileLayout.layout, recoveryCleanupWorkCollector, monitor, descriptor, samplingConfig ); super( pageCache, fs, fileLayout.getIndexFile(), fileLayout.layout, recoveryCleanupWorkCollector, monitor, descriptor, samplingConfig );
this.layout = fileLayout.layout; this.layout = fileLayout.layout;
this.descriptor = descriptor; this.descriptor = descriptor;
this.samplingConfig = samplingConfig; this.samplingConfig = samplingConfig;
Expand Down Expand Up @@ -237,16 +237,16 @@ static class PartFactory implements Factory<PartAccessor>
@Override @Override
public PartAccessor newSpatial( CoordinateReferenceSystem crs ) throws IOException public PartAccessor newSpatial( CoordinateReferenceSystem crs ) throws IOException
{ {
SpatialIndexFiles.SpatialFile indexFile = spatialIndexFiles.forCrs( crs ); SpatialIndexFiles.SpatialFile spatialFile = spatialIndexFiles.forCrs( crs );
if ( !fs.fileExists( indexFile.indexFile ) ) if ( !fs.fileExists( spatialFile.indexFile ) )
{ {
SpatialIndexFiles.SpatialFileLayout fileLayout = indexFile.getLayoutForNewIndex(); SpatialIndexFiles.SpatialFileLayout fileLayout = spatialFile.getLayoutForNewIndex();
createEmptyIndex( fileLayout ); createEmptyIndex( fileLayout );
return createPartAccessor( fileLayout ); return createPartAccessor( fileLayout );
} }
else else
{ {
return createPartAccessor( indexFile.getLayoutForExistingIndex( pageCache ) ); return createPartAccessor( spatialFile.getLayoutForExistingIndex( pageCache ) );
} }
} }


Expand Down
Expand Up @@ -133,5 +133,10 @@ static class SpatialFileLayout
this.settings = settings; this.settings = settings;
this.layout = new SpatialLayout( spatialFile.crs, settings.curve() ); this.layout = new SpatialLayout( spatialFile.crs, settings.curve() );
} }

public File getIndexFile()
{
return spatialFile.indexFile;
}
} }
} }
Expand Up @@ -151,7 +151,7 @@ static class PartPopulator extends NativeIndexPopulator<SpatialIndexKey,NativeIn
PartPopulator( PageCache pageCache, FileSystemAbstraction fs, SpatialIndexFiles.SpatialFileLayout fileLayout, IndexProvider.Monitor monitor, PartPopulator( PageCache pageCache, FileSystemAbstraction fs, SpatialIndexFiles.SpatialFileLayout fileLayout, IndexProvider.Monitor monitor,
StoreIndexDescriptor descriptor, IndexSamplingConfig samplingConfig, SpaceFillingCurveConfiguration configuration ) StoreIndexDescriptor descriptor, IndexSamplingConfig samplingConfig, SpaceFillingCurveConfiguration configuration )
{ {
super( pageCache, fs, fileLayout.spatialFile.indexFile, fileLayout.layout, monitor, descriptor, samplingConfig ); super( pageCache, fs, fileLayout.getIndexFile(), fileLayout.layout, monitor, descriptor, samplingConfig );
this.configuration = configuration; this.configuration = configuration;
this.settings = fileLayout.settings; this.settings = fileLayout.settings;
} }
Expand Down

0 comments on commit c5a7772

Please sign in to comment.