use of org.commonjava.indy.pkg.maven.content.MetadataKey in project indy by Commonjava.
the class MetadataKeyMarshaller method readFrom.
@Override
public MetadataKey readFrom(ProtoStreamReader reader) throws IOException {
StoreKey storeKey = reader.readObject("storeKey", StoreKey.class);
String path = reader.readString("path");
return new MetadataKey(storeKey, path);
}
use of org.commonjava.indy.pkg.maven.content.MetadataKey in project indy by Commonjava.
the class MetadataCacheProducer method mavenMetadataKeyCacheCfg.
@MavenMetadataKeyCache
@Produces
@ApplicationScoped
public BasicCacheHandle<MetadataKey, MetadataKey> mavenMetadataKeyCacheCfg() {
if (remoteConfiguration.isEnabled()) {
List<BaseMarshaller> keyMarshallers = new ArrayList<>();
keyMarshallers.add(new MetadataKeyMarshaller());
keyMarshallers.add(new StoreKeyMarshaller());
keyMarshallers.add(new StoreTypeMarshaller());
cacheProducer.registerProtoAndMarshallers("metadata_key.proto", keyMarshallers);
}
BasicCacheHandle<MetadataKey, MetadataKey> handler = cacheProducer.getBasicCache(METADATA_KEY_CACHE);
registerTransformer(handler);
return handler;
}
Aggregations