Class ServiceBrokerConfig
java.lang.Object
services.moleculer.config.ServiceBrokerConfig
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Cacherstatic final StringDefault Moleculer wire-protocol version stamped onto outgoing packets.protected Eventbusprotected ExecutorServiceprotected AtomicLongService Broker instance counter (0...N)protected booleanInstall internal ($node) services?protected StringName (or comma-separated list) of the JSON deserializer API ("jackson", "boon", "builtin", "gson", "fastjson", "genson", etc., null = autodetect / fastest)protected StringName (or comma-separated list) of the JSON serializer API ("jackson", "boon", "builtin", "gson", "fast", "genson", "flex", "nano", etc., null = autodetect / fastest)protected Metricsprotected booleanprotected Monitorprotected StringNamespace of Broker.protected StringUnique NodeID of Broker.protected StringMoleculer wire-protocol version ("ver" field).protected ScheduledExecutorServiceprotected ServiceInvokerprotected ServiceRegistryprotected booleanprotected StrategyFactoryprotected Transporterprotected UidGenerator -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanbooleanvoidvoidsetEventbus(Eventbus eventbus) voidsetExecutor(ExecutorService executor) voidsetInternalServices(boolean internalServices) voidsetJsonReaders(String jsonReader) voidsetJsonWriters(String jsonWriter) voidsetMetrics(Metrics metrics) voidsetMetricsEnabled(boolean metricsEnabled) voidsetMonitor(Monitor monitor) voidsetNamespace(String namespace) voidvoidsetProtocolVersion(String protocolVersion) voidsetScheduler(ScheduledExecutorService scheduler) voidsetServiceInvoker(ServiceInvoker serviceInvoker) voidsetServiceRegistry(ServiceRegistry serviceRegistry) voidsetShutDownThreadPools(boolean shutDownThreadPools) voidsetStrategyFactory(StrategyFactory strategyFactory) voidsetTransporter(Transporter transporter) voidsetUidGenerator(UidGenerator uidGenerator)
-
Field Details
-
executor
-
scheduler
-
shutDownThreadPools
protected boolean shutDownThreadPools -
namespace
Namespace of Broker. -
nodeID
Unique NodeID of Broker. -
DEFAULT_PROTOCOL_VERSION
Default Moleculer wire-protocol version stamped onto outgoing packets. Moleculer JS 0.15 speaks "5" (and silently drops packets with a different "ver"); 0.14 spoke "4". The two are wire-compatible for the JSON serializer, so "5" is the default to interoperate with current Moleculer JS out of the box. SetsetProtocolVersion(String)to "4" when talking to legacy 0.14 nodes.- See Also:
-
protocolVersion
Moleculer wire-protocol version ("ver" field). Seeded from the "moleculer.protocol.version" System Property, falling back toDEFAULT_PROTOCOL_VERSION; override per broker viasetProtocolVersion(String). -
internalServices
protected boolean internalServicesInstall internal ($node) services? -
jsonReaders
Name (or comma-separated list) of the JSON deserializer API ("jackson", "boon", "builtin", "gson", "fastjson", "genson", etc., null = autodetect / fastest) -
jsonWriters
Name (or comma-separated list) of the JSON serializer API ("jackson", "boon", "builtin", "gson", "fast", "genson", "flex", "nano", etc., null = autodetect / fastest) -
instanceCounter
Service Broker instance counter (0...N) -
uidGenerator
-
strategyFactory
-
eventbus
-
serviceRegistry
-
serviceInvoker
-
metrics
-
cacher
-
transporter
-
monitor
-
metricsEnabled
protected boolean metricsEnabled
-
-
Constructor Details
-
ServiceBrokerConfig
public ServiceBrokerConfig() -
ServiceBrokerConfig
-
-
Method Details
-
getExecutor
-
setExecutor
-
getScheduler
-
setScheduler
-
isShutDownThreadPools
public boolean isShutDownThreadPools() -
setShutDownThreadPools
public void setShutDownThreadPools(boolean shutDownThreadPools) -
getNamespace
-
setNamespace
-
getNodeID
-
setNodeID
-
getProtocolVersion
-
setProtocolVersion
-
isInternalServices
public boolean isInternalServices() -
setInternalServices
public void setInternalServices(boolean internalServices) -
getJsonReaders
-
setJsonReaders
-
getJsonWriters
-
setJsonWriters
-
getServiceRegistry
-
setServiceRegistry
-
getStrategyFactory
-
setStrategyFactory
-
getUidGenerator
-
setUidGenerator
-
getEventbus
-
setEventbus
-
getCacher
-
setCacher
-
getMonitor
-
setMonitor
-
getTransporter
-
setTransporter
-
getServiceInvoker
-
setServiceInvoker
-
getMetrics
-
setMetrics
-
isMetricsEnabled
public boolean isMetricsEnabled() -
setMetricsEnabled
public void setMetricsEnabled(boolean metricsEnabled)
-