Class ProtobufMetadataManagerImpl

java.lang.Object
org.infinispan.query.remote.impl.ProtobufMetadataManagerImpl
All Implemented Interfaces:
org.infinispan.query.remote.client.ProtobufMetadataManagerConstants, org.infinispan.query.remote.client.ProtobufMetadataManagerMBean, ProtobufMetadataManager

@MBean(objectName="ProtobufMetadataManager", description="Component that acts as a manager and persistent container for Protocol Buffers schema definitions in the scope of a CacheManger.") public final class ProtobufMetadataManagerImpl extends Object implements ProtobufMetadataManager
Since:
7.0
Author:
anistor@redhat.com
  • Constructor Details

    • ProtobufMetadataManagerImpl

      public ProtobufMetadataManagerImpl()
  • Method Details

    • getCache

      public org.infinispan.Cache<String,String> getCache()
      Get the protobuf schema cache (lazily).
    • registerMarshaller

      public void registerMarshaller(org.infinispan.protostream.BaseMarshaller<?> marshaller)
      Specified by:
      registerMarshaller in interface ProtobufMetadataManager
    • unregisterMarshaller

      public void unregisterMarshaller(org.infinispan.protostream.BaseMarshaller<?> marshaller)
      Specified by:
      unregisterMarshaller in interface ProtobufMetadataManager
    • registerProtofile

      @ManagedOperation(description="Registers a Protobuf definition file", displayName="Register a Protofile") public void registerProtofile(@Parameter(name="fileName",description="the name of the .proto file") String fileName, @Parameter(name="contents",description="contents of the file") String contents)
      Specified by:
      registerProtofile in interface org.infinispan.query.remote.client.ProtobufMetadataManagerMBean
    • registerProtofiles

      @ManagedOperation(description="Registers multiple Protobuf definition files", displayName="Register Protofiles") public void registerProtofiles(@Parameter(name="fileNames",description="names of the protofiles") String[] fileNames, @Parameter(name="fileContents",description="content of the files") String[] contents) throws Exception
      Specified by:
      registerProtofiles in interface org.infinispan.query.remote.client.ProtobufMetadataManagerMBean
      Throws:
      Exception
    • unregisterProtofile

      @ManagedOperation(description="Unregisters a Protobuf definition files", displayName="Unregister a Protofiles") public void unregisterProtofile(@Parameter(name="fileName",description="the name of the .proto file") String fileName)
      Specified by:
      unregisterProtofile in interface org.infinispan.query.remote.client.ProtobufMetadataManagerMBean
    • unregisterProtofiles

      @ManagedOperation(description="Unregisters multiple Protobuf definition files", displayName="Unregister Protofiles") public void unregisterProtofiles(@Parameter(name="fileNames",description="names of the protofiles") String[] fileNames)
      Specified by:
      unregisterProtofiles in interface org.infinispan.query.remote.client.ProtobufMetadataManagerMBean
    • getProtofileNames

      @ManagedAttribute(description="The names of all Protobuf files", displayName="Protofile Names") public String[] getProtofileNames()
      Specified by:
      getProtofileNames in interface org.infinispan.query.remote.client.ProtobufMetadataManagerMBean
    • getProtofile

      @ManagedOperation(description="Get the contents of a protobuf definition file", displayName="Get Protofile") public String getProtofile(@Parameter(name="fileName",description="the name of the .proto file") String fileName)
      Specified by:
      getProtofile in interface org.infinispan.query.remote.client.ProtobufMetadataManagerMBean
    • getFilesWithErrors

      @ManagedAttribute(description="The names of the files that have errors, if any", displayName="Files With Errors") public String[] getFilesWithErrors()
      Specified by:
      getFilesWithErrors in interface org.infinispan.query.remote.client.ProtobufMetadataManagerMBean
    • getFileErrors

      @ManagedOperation(description="Obtains the errors associated with a protobuf definition file", displayName="Get Errors For A File") public String getFileErrors(@Parameter(name="fileName",description="the name of the .proto file") String fileName)
      Specified by:
      getFileErrors in interface org.infinispan.query.remote.client.ProtobufMetadataManagerMBean
    • getKnownTypes

      public Set<String> getKnownTypes()
    • getSerializationContext

      public static org.infinispan.protostream.SerializationContext getSerializationContext(org.infinispan.manager.EmbeddedCacheManager cacheManager)
      Obtains the protobuf serialization context of the ProtobufMetadataManager instance associated to a cache manager.
      Parameters:
      cacheManager - a cache manager instance
      Returns:
      the protobuf SerializationContext