Search in sources :

Example 1 with MetadataKeyMarshaller

use of org.commonjava.indy.pkg.maven.content.marshaller.MetadataKeyMarshaller in project indy by Commonjava.

the class MetadataCacheProducer method mavenMetadataCacheCfg.

@MavenMetadataCache
@Produces
@ApplicationScoped
public BasicCacheHandle<MetadataKey, MetadataInfo> mavenMetadataCacheCfg() {
    if (remoteConfiguration.isEnabled()) {
        List<BaseMarshaller> infoMarshallers = new ArrayList<>();
        infoMarshallers.add(new MetadataInfoMarshaller());
        infoMarshallers.add(new MetadataMarshaller());
        infoMarshallers.add(new VersioningMarshaller());
        infoMarshallers.add(new SnapshotMarshaller());
        infoMarshallers.add(new SnapshotVersionMarshaller());
        infoMarshallers.add(new VersioningMarshaller());
        cacheProducer.registerProtoAndMarshallers("metadata_info.proto", infoMarshallers);
        List<BaseMarshaller> keyMarshallers = new ArrayList<>();
        keyMarshallers.add(new MetadataKeyMarshaller());
        keyMarshallers.add(new StoreKeyMarshaller());
        keyMarshallers.add(new StoreTypeMarshaller());
        cacheProducer.registerProtoAndMarshallers("metadata_key.proto", keyMarshallers);
    }
    return cacheProducer.getBasicCache(METADATA_CACHE);
}
Also used : MetadataMarshaller(org.commonjava.indy.pkg.maven.content.marshaller.MetadataMarshaller) StoreTypeMarshaller(org.commonjava.indy.pkg.maven.content.marshaller.StoreTypeMarshaller) SnapshotMarshaller(org.commonjava.indy.pkg.maven.content.marshaller.SnapshotMarshaller) BaseMarshaller(org.infinispan.protostream.BaseMarshaller) ArrayList(java.util.ArrayList) SnapshotVersionMarshaller(org.commonjava.indy.pkg.maven.content.marshaller.SnapshotVersionMarshaller) MetadataInfoMarshaller(org.commonjava.indy.pkg.maven.content.marshaller.MetadataInfoMarshaller) VersioningMarshaller(org.commonjava.indy.pkg.maven.content.marshaller.VersioningMarshaller) MetadataKeyMarshaller(org.commonjava.indy.pkg.maven.content.marshaller.MetadataKeyMarshaller) StoreKeyMarshaller(org.commonjava.indy.pkg.maven.content.marshaller.StoreKeyMarshaller) Produces(javax.enterprise.inject.Produces) ApplicationScoped(javax.enterprise.context.ApplicationScoped)

Example 2 with MetadataKeyMarshaller

use of org.commonjava.indy.pkg.maven.content.marshaller.MetadataKeyMarshaller 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;
}
Also used : StoreTypeMarshaller(org.commonjava.indy.pkg.maven.content.marshaller.StoreTypeMarshaller) BaseMarshaller(org.infinispan.protostream.BaseMarshaller) ArrayList(java.util.ArrayList) MetadataKey(org.commonjava.indy.pkg.maven.content.MetadataKey) MetadataKeyMarshaller(org.commonjava.indy.pkg.maven.content.marshaller.MetadataKeyMarshaller) StoreKeyMarshaller(org.commonjava.indy.pkg.maven.content.marshaller.StoreKeyMarshaller) Produces(javax.enterprise.inject.Produces) ApplicationScoped(javax.enterprise.context.ApplicationScoped)

Aggregations

ArrayList (java.util.ArrayList)2 ApplicationScoped (javax.enterprise.context.ApplicationScoped)2 Produces (javax.enterprise.inject.Produces)2 MetadataKeyMarshaller (org.commonjava.indy.pkg.maven.content.marshaller.MetadataKeyMarshaller)2 StoreKeyMarshaller (org.commonjava.indy.pkg.maven.content.marshaller.StoreKeyMarshaller)2 StoreTypeMarshaller (org.commonjava.indy.pkg.maven.content.marshaller.StoreTypeMarshaller)2 BaseMarshaller (org.infinispan.protostream.BaseMarshaller)2 MetadataKey (org.commonjava.indy.pkg.maven.content.MetadataKey)1 MetadataInfoMarshaller (org.commonjava.indy.pkg.maven.content.marshaller.MetadataInfoMarshaller)1 MetadataMarshaller (org.commonjava.indy.pkg.maven.content.marshaller.MetadataMarshaller)1 SnapshotMarshaller (org.commonjava.indy.pkg.maven.content.marshaller.SnapshotMarshaller)1 SnapshotVersionMarshaller (org.commonjava.indy.pkg.maven.content.marshaller.SnapshotVersionMarshaller)1 VersioningMarshaller (org.commonjava.indy.pkg.maven.content.marshaller.VersioningMarshaller)1