Package org.infinispan.query.remote.impl
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
-
-
Field Summary
-
Fields inherited from interface org.infinispan.query.remote.ProtobufMetadataManager
SCHEMA_MANAGER_ROLE
-
-
Constructor Summary
Constructors Constructor Description ProtobufMetadataManagerImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.infinispan.Cache<String,String>getCache()Get the protobuf schema cache (lazily).StringgetFileErrors(String fileName)String[]getFilesWithErrors()Set<String>getKnownTypes()StringgetProtofile(String fileName)String[]getProtofileNames()static org.infinispan.protostream.SerializationContextgetSerializationContext(org.infinispan.manager.EmbeddedCacheManager cacheManager)Obtains the protobuf serialization context of the ProtobufMetadataManager instance associated to a cache manager.voidregisterMarshaller(org.infinispan.protostream.BaseMarshaller<?> marshaller)voidregisterProtofile(String fileName, String contents)voidregisterProtofiles(String[] fileNames, String[] contents)voidunregisterMarshaller(org.infinispan.protostream.BaseMarshaller<?> marshaller)voidunregisterProtofile(String fileName)voidunregisterProtofiles(String[] fileNames)
-
-
-
Method Detail
-
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:
registerMarshallerin interfaceProtobufMetadataManager
-
unregisterMarshaller
public void unregisterMarshaller(org.infinispan.protostream.BaseMarshaller<?> marshaller)
- Specified by:
unregisterMarshallerin interfaceProtobufMetadataManager
-
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:
registerProtofilein interfaceorg.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:
registerProtofilesin interfaceorg.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:
unregisterProtofilein interfaceorg.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:
unregisterProtofilesin interfaceorg.infinispan.query.remote.client.ProtobufMetadataManagerMBean
-
getProtofileNames
@ManagedAttribute(description="The names of all Protobuf files", displayName="Protofile Names") public String[] getProtofileNames()- Specified by:
getProtofileNamesin interfaceorg.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:
getProtofilein interfaceorg.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:
getFilesWithErrorsin interfaceorg.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:
getFileErrorsin interfaceorg.infinispan.query.remote.client.ProtobufMetadataManagerMBean
-
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
-
-