public EventServiceMBean(HazelcastInstance hazelcastInstance, EventService eventService, ManagementService service) { super(eventService, service); Hashtable<String, String> properties = new Hashtable<String, String>(INITIAL_CAPACITY); properties.put("type", quote("HazelcastInstance.EventService")); properties.put("name", quote(hazelcastInstance.getName())); properties.put("instance", quote(hazelcastInstance.getName())); setObjectName(properties); }
public EventServiceMBean(HazelcastInstance hazelcastInstance, EventService eventService, ManagementService service) { super(eventService, service); Hashtable<String, String> properties = new Hashtable<String, String>(INITIAL_CAPACITY); properties.put("type", quote("HazelcastInstance.EventService")); properties.put("name", quote(hazelcastInstance.getName())); properties.put("instance", quote(hazelcastInstance.getName())); setObjectName(properties); }
private void startResponseThreadIfNotRunning() { if (responseThreadRunnable == null) { synchronized (mutex) { if (responseThreadRunnable == null) { responseThreadRunnable = new ResponseThreadRunnable(); String threadNamePrefix = createThreadName(hazelcast.getName(), "ascii.service.response"); Thread thread = new Thread(responseThreadRunnable, threadNamePrefix); thread.start(); } } } }
private void startResponseThreadIfNotRunning() { if (responseThreadRunnable == null) { synchronized (mutex) { if (responseThreadRunnable == null) { responseThreadRunnable = new ResponseThreadRunnable(); String threadNamePrefix = createThreadName(hazelcast.getName(), "ascii.service.response"); Thread thread = new Thread(responseThreadRunnable, threadNamePrefix); thread.start(); } } } }
@Override public void onFatalError(Exception e) { String hzName = nodeEngine.getHazelcastInstance().getName(); Thread thread = new Thread(createThreadName(hzName, "io.error.shutdown")) { public void run() { node.shutdown(false); } }; thread.start(); }
public ProxyServiceMBean(HazelcastInstance hazelcastInstance, ProxyService proxyService, ManagementService service) { super(proxyService, service); final Map<String, String> properties = createHashMap(INITIAL_CAPACITY); properties.put("type", quote("HazelcastInstance.ProxyService")); properties.put("name", quote("proxyService" + hazelcastInstance.getName())); properties.put("instance", quote(hazelcastInstance.getName())); setObjectName(properties); }
public ProxyServiceMBean(HazelcastInstance hazelcastInstance, ProxyService proxyService, ManagementService service) { super(proxyService, service); final Map<String, String> properties = createHashMap(INITIAL_CAPACITY); properties.put("type", quote("HazelcastInstance.ProxyService")); properties.put("name", quote("proxyService" + hazelcastInstance.getName())); properties.put("instance", quote(hazelcastInstance.getName())); setObjectName(properties); }
public OperationServiceMBean(HazelcastInstance hazelcastInstance, InternalOperationService operationService, ManagementService service) { super(operationService, service); final Map<String, String> properties = createHashMap(INITIAL_CAPACITY); properties.put("type", quote("HazelcastInstance.OperationService")); properties.put("name", quote("operationService" + hazelcastInstance.getName())); properties.put("instance", quote(hazelcastInstance.getName())); setObjectName(properties); }
public ConnectionManagerMBean(HazelcastInstance hazelcastInstance, ConnectionManager connectionManager, ManagementService service) { super(connectionManager, service); //no need to create HashTable here, as the setObjectName method creates a copy of the given properties final Map<String, String> properties = createHashMap(PROPERTY_COUNT); properties.put("type", quote("HazelcastInstance.ConnectionManager")); properties.put("instance", quote(hazelcastInstance.getName())); properties.put("name", quote(hazelcastInstance.getName())); setObjectName(properties); }
@Override public void clientConnected(com.hazelcast.core.Client client) { System.out.println("Client : " + client.getName() + " is connected to member: " + instance.getName()); System.out.println("Client : " + client.getName() + " is connected with attributes " + client.getAttributes()); }
@Override public void clientConnected(com.hazelcast.core.Client client) { System.out.println("Client : " + client.getName() + " is connected to member: " + instance.getName()); System.out.println("Client : " + client.getName() + " is connected with attributes " + client.getAttributes()); }
private String getInstanceName() { ClientContext context = getContext(); return context != null ? context.getHazelcastInstance().getName() : ""; } }
public NodeMBean(HazelcastInstance hazelcastInstance, Node node, ManagementService service) { super(node, service); final Map<String, String> properties = createHashMap(INITIAL_CAPACITY); properties.put("type", quote("HazelcastInstance.Node")); properties.put("name", quote("node" + node.address)); properties.put("instance", quote(hazelcastInstance.getName())); setObjectName(properties); }
public ManagedExecutorServiceMBean(HazelcastInstance hazelcastInstance, ManagedExecutorService executorService, ManagementService service) { super(executorService, service); final Map<String, String> properties = createHashMap(INITIAL_CAPACITY); properties.put("type", quote("HazelcastInstance.ManagedExecutorService")); properties.put("name", quote(executorService.getName())); properties.put("instance", quote(hazelcastInstance.getName())); setObjectName(properties); }
public HazelcastInstance getClient() { HazelcastInstance client = HazelcastClient.newHazelcastClient(clientConfig); LOG.info("Hazelcast client {}", client.getName()); return client; }
private Diagnostics newDiagnostics() { Address address = node.getThisAddress(); String addressString = address.getHost().replace(":", "_") + "_" + address.getPort(); String name = "diagnostics-" + addressString + "-" + currentTimeMillis(); return new Diagnostics( name, loggingService.getLogger(Diagnostics.class), getHazelcastInstance().getName(), node.getProperties()); }
public OperationParkerImpl(NodeEngineImpl nodeEngine) { this.nodeEngine = nodeEngine; Node node = nodeEngine.getNode(); this.logger = node.getLogger(OperationParker.class); this.expirationExecutor = Executors.newSingleThreadExecutor( new SingleExecutorThreadFactory(node.getConfigClassLoader(), createThreadName(nodeEngine.getHazelcastInstance().getName(), "operation-parker"))); this.expirationTaskFuture = expirationExecutor.submit(new ExpirationTask()); }
private Diagnostics newDiagnostics() { Address address = node.getThisAddress(); String addressString = address.getHost().replace(":", "_") + "_" + address.getPort(); String name = "diagnostics-" + addressString + "-" + currentTimeMillis(); return new Diagnostics( name, loggingService.getLogger(Diagnostics.class), getHazelcastInstance().getName(), node.getProperties()); }
public OperationParkerImpl(NodeEngineImpl nodeEngine) { this.nodeEngine = nodeEngine; Node node = nodeEngine.getNode(); this.logger = node.getLogger(OperationParker.class); this.expirationExecutor = Executors.newSingleThreadExecutor( new SingleExecutorThreadFactory(node.getConfigClassLoader(), createThreadName(nodeEngine.getHazelcastInstance().getName(), "operation-parker"))); this.expirationTaskFuture = expirationExecutor.submit(new ExpirationTask()); }