summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2014-04-02 03:55:10 +0000
committerOlivier Lamy <olamy@apache.org>2014-04-02 03:55:10 +0000
commitf9c01084da93d2876e1b023b8de1079f835e54bc (patch)
tree89b6a1e9accce7318d85ae6183e325ddf67ff62e
parent4c30eb6a9d2e474d66b70baf8076e7f74e4afbf8 (diff)
downloadarchiva-f9c01084da93d2876e1b023b8de1079f835e54bc.tar.gz
archiva-f9c01084da93d2876e1b023b8de1079f835e54bc.zip
fix comment
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1583866 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepository.java21
1 files changed, 12 insertions, 9 deletions
diff --git a/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepository.java b/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepository.java
index 226f82e3e..0241e48a9 100644
--- a/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepository.java
+++ b/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepository.java
@@ -61,11 +61,14 @@ import org.apache.archiva.metadata.repository.cassandra.model.Namespace;
import org.apache.archiva.metadata.repository.cassandra.model.Project;
import org.apache.archiva.metadata.repository.cassandra.model.ProjectVersionMetadataModel;
import org.apache.archiva.metadata.repository.cassandra.model.Repository;
+import org.apache.archiva.redback.components.cache.Cache;
import org.apache.commons.lang.StringUtils;
import org.modelmapper.ModelMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import javax.inject.Inject;
+import javax.inject.Named;
import javax.persistence.PersistenceException;
import java.util.ArrayList;
import java.util.Collection;
@@ -539,8 +542,8 @@ public class CassandraMetadataRepository
}
- // FIXME this one need peformance improvement maybe a cache?
- public List<String> getNamespaces( final String repoId )
+ // only use for testing purpose
+ protected List<String> getNamespaces( final String repoId )
throws MetadataResolutionException
{
@@ -1061,7 +1064,7 @@ public class CassandraMetadataRepository
MetadataFacetFactory metadataFacetFactory = metadataFacetFactories.get( entry.getKey() );
if ( metadataFacetFactory != null )
{
- MetadataFacet metadataFacet = metadataFacetFactory.createMetadataFacet( );
+ MetadataFacet metadataFacet = metadataFacetFactory.createMetadataFacet();
metadataFacet.fromProperties( entry.getValue() );
projectVersionMetadata.addFacet( metadataFacet );
}
@@ -1356,9 +1359,9 @@ public class CassandraMetadataRepository
updater.setLong( "fileLastModified", artifactMeta.getFileLastModified().getTime() );
updater.setLong( "whenGathered", artifactMeta.getWhenGathered().getTime() );
updater.setLong( "size", artifactMeta.getSize() );
- addUpdateStringValue(updater, "md5", artifactMeta.getMd5() );
- addUpdateStringValue(updater, "sha1", artifactMeta.getSha1() );
- addUpdateStringValue(updater, "version", artifactMeta.getVersion() );
+ addUpdateStringValue( updater, "md5", artifactMeta.getMd5() );
+ addUpdateStringValue( updater, "sha1", artifactMeta.getSha1() );
+ addUpdateStringValue( updater, "version", artifactMeta.getVersion() );
this.artifactMetadataTemplate.update( updater );
}
else
@@ -1606,8 +1609,8 @@ public class CassandraMetadataRepository
if ( exists )
{
ColumnFamilyUpdater<String, String> updater = this.metadataFacetTemplate.createUpdater( key );
- addUpdateStringValue(updater, "facetId", metadataFacet.getFacetId() );
- addUpdateStringValue(updater, "name", metadataFacet.getName() );
+ addUpdateStringValue( updater, "facetId", metadataFacet.getFacetId() );
+ addUpdateStringValue( updater, "name", metadataFacet.getName() );
this.metadataFacetTemplate.update( updater );
}
else
@@ -1643,7 +1646,7 @@ public class CassandraMetadataRepository
else
{
ColumnFamilyUpdater<String, String> updater = this.metadataFacetTemplate.createUpdater( key );
- addUpdateStringValue(updater, "value", entry.getValue() );
+ addUpdateStringValue( updater, "value", entry.getValue() );
this.metadataFacetTemplate.update( updater );
}
}