注释
This commit is contained in:
@@ -105,7 +105,7 @@ class NodeAutoServiceLoader implements ResourceTypeLoader {
|
|||||||
service.init(null);
|
service.init(null);
|
||||||
}
|
}
|
||||||
logger.info("Load Service(" + (Sncp.isRemote(service) ? "Remote" : "@Local") + " @AutoLoad service = "
|
logger.info("Load Service(" + (Sncp.isRemote(service) ? "Remote" : "@Local") + " @AutoLoad service = "
|
||||||
+ serviceImplClass.getSimpleName() + ", resourceName = '" + resourceName + "')");
|
+ serviceImplClass.getSimpleName() + ", resourceName='" + resourceName + "')");
|
||||||
return service;
|
return service;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.log(
|
logger.log(
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ public class CachedManagerService implements CachedManager, Service {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return getClass().getSimpleName() + "_" + Objects.hash(this) + "{name = '" + name + "', schema = '" + schema
|
return getClass().getSimpleName() + "_" + Objects.hash(this) + "{name='" + name + "', schema='" + schema
|
||||||
+ "'}";
|
+ "'}";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ public class ClusterModuleEngine extends ModuleEngine {
|
|||||||
if (logger.isLoggable(Level.FINER)) {
|
if (logger.isLoggable(Level.FINER)) {
|
||||||
logger.log(
|
logger.log(
|
||||||
Level.FINER,
|
Level.FINER,
|
||||||
"ClusterAgent (type = " + this.clusterAgent.getClass().getSimpleName() + ") initing");
|
"ClusterAgent (type=" + this.clusterAgent.getClass().getSimpleName() + ") initing");
|
||||||
}
|
}
|
||||||
long s = System.currentTimeMillis();
|
long s = System.currentTimeMillis();
|
||||||
if (this.clusterAgent instanceof CacheClusterAgent) {
|
if (this.clusterAgent instanceof CacheClusterAgent) {
|
||||||
@@ -112,7 +112,7 @@ public class ClusterModuleEngine extends ModuleEngine {
|
|||||||
this.resourceFactory.inject(clusterAgent);
|
this.resourceFactory.inject(clusterAgent);
|
||||||
clusterAgent.init(clusterAgent.getConfig());
|
clusterAgent.init(clusterAgent.getConfig());
|
||||||
this.resourceFactory.register(ClusterAgent.class, clusterAgent);
|
this.resourceFactory.register(ClusterAgent.class, clusterAgent);
|
||||||
logger.info("ClusterAgent (type = " + this.clusterAgent.getClass().getSimpleName() + ") init in "
|
logger.info("ClusterAgent (type=" + this.clusterAgent.getClass().getSimpleName() + ") init in "
|
||||||
+ (System.currentTimeMillis() - s) + " ms");
|
+ (System.currentTimeMillis() - s) + " ms");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,9 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
package org.redkale.net.sncp;
|
package org.redkale.net.sncp;
|
||||||
|
|
||||||
import static org.redkale.net.sncp.Sncp.loadRemoteMethodActions;
|
|
||||||
import static org.redkale.net.sncp.SncpHeader.HEADER_SUBSIZE;
|
|
||||||
|
|
||||||
import java.lang.annotation.Annotation;
|
import java.lang.annotation.Annotation;
|
||||||
import java.lang.reflect.*;
|
import java.lang.reflect.*;
|
||||||
import java.net.*;
|
import java.net.*;
|
||||||
@@ -19,6 +16,8 @@ import org.redkale.convert.json.JsonConvert;
|
|||||||
import org.redkale.mq.spi.MessageAgent;
|
import org.redkale.mq.spi.MessageAgent;
|
||||||
import org.redkale.mq.spi.MessageClient;
|
import org.redkale.mq.spi.MessageClient;
|
||||||
import org.redkale.mq.spi.MessageRecord;
|
import org.redkale.mq.spi.MessageRecord;
|
||||||
|
import static org.redkale.net.sncp.Sncp.loadRemoteMethodActions;
|
||||||
|
import static org.redkale.net.sncp.SncpHeader.HEADER_SUBSIZE;
|
||||||
import org.redkale.service.*;
|
import org.redkale.service.*;
|
||||||
import org.redkale.util.*;
|
import org.redkale.util.*;
|
||||||
|
|
||||||
@@ -294,26 +293,26 @@ public class SncpRemoteInfo<S extends Service> {
|
|||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
InetSocketAddress clientSncpAddress = sncpClient == null ? null : sncpClient.getClientSncpAddress();
|
InetSocketAddress clientSncpAddress = sncpClient == null ? null : sncpClient.getClientSncpAddress();
|
||||||
return this.getClass().getSimpleName() + "(service = " + serviceType.getSimpleName() + ", serviceid = "
|
return this.getClass().getSimpleName() + "(service=" + serviceType.getSimpleName() + ", serviceid="
|
||||||
+ serviceid
|
+ serviceid
|
||||||
+ ", serviceVersion = " + serviceVersion + ", name = '" + name
|
+ ", serviceVersion=" + serviceVersion + ", name='" + name
|
||||||
+ "', address = "
|
+ "', address="
|
||||||
+ (clientSncpAddress == null
|
+ (clientSncpAddress == null
|
||||||
? ""
|
? ""
|
||||||
: (clientSncpAddress.getHostString() + ":" + clientSncpAddress.getPort()))
|
: (clientSncpAddress.getHostString() + ":" + clientSncpAddress.getPort()))
|
||||||
+ ", actions.size = " + actions.size() + ")";
|
+ ", actions.size=" + actions.size() + ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
public String toSimpleString() { // 给Sncp产生的Service用
|
public String toSimpleString() { // 给Sncp产生的Service用
|
||||||
InetSocketAddress clientSncpAddress = sncpClient == null ? null : sncpClient.getClientSncpAddress();
|
InetSocketAddress clientSncpAddress = sncpClient == null ? null : sncpClient.getClientSncpAddress();
|
||||||
return serviceType.getSimpleName() + "(name = '" + name + "', serviceid = " + serviceid + ", serviceVersion = "
|
return serviceType.getSimpleName() + "(name='" + name + "', serviceid=" + serviceid + ", serviceVersion="
|
||||||
+ serviceVersion
|
+ serviceVersion
|
||||||
+ ", clientaddr = "
|
+ ", clientaddr="
|
||||||
+ (clientSncpAddress == null
|
+ (clientSncpAddress == null
|
||||||
? ""
|
? ""
|
||||||
: (clientSncpAddress.getHostString() + ":" + clientSncpAddress.getPort()))
|
: (clientSncpAddress.getHostString() + ":" + clientSncpAddress.getPort()))
|
||||||
+ ((remoteGroup == null || remoteGroup.isEmpty()) ? "" : ", remoteGroup = " + remoteGroup)
|
+ ((remoteGroup == null || remoteGroup.isEmpty()) ? "" : ", remoteGroup=" + remoteGroup)
|
||||||
+ ", actions.size = " + actions.size() + ")";
|
+ ", actions.size=" + actions.size() + ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateRemoteAddress(String remoteGroup, Set<InetSocketAddress> remoteAddresses) {
|
public void updateRemoteAddress(String remoteGroup, Set<InetSocketAddress> remoteAddresses) {
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ public class PropertiesModule extends BootModule {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
logger.info("PropertiesAgent (type = "
|
logger.info("PropertiesAgent (type="
|
||||||
+ this.propertiesAgent.getClass().getSimpleName() + ") load " + propCount + " data in "
|
+ this.propertiesAgent.getClass().getSimpleName() + ") load " + propCount + " data in "
|
||||||
+ (System.currentTimeMillis() - s) + " ms");
|
+ (System.currentTimeMillis() - s) + " ms");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,8 +5,6 @@
|
|||||||
*/
|
*/
|
||||||
package org.redkale.source;
|
package org.redkale.source;
|
||||||
|
|
||||||
import static org.redkale.util.Utility.isEmpty;
|
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.net.*;
|
import java.net.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@@ -14,6 +12,7 @@ import org.redkale.inject.ResourceFactory;
|
|||||||
import org.redkale.service.Service;
|
import org.redkale.service.Service;
|
||||||
import org.redkale.source.spi.DataSourceProvider;
|
import org.redkale.source.spi.DataSourceProvider;
|
||||||
import org.redkale.util.*;
|
import org.redkale.util.*;
|
||||||
|
import static org.redkale.util.Utility.isEmpty;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 构建DataSource对象的工具类
|
* 构建DataSource对象的工具类
|
||||||
@@ -441,7 +440,7 @@ public final class DataSources {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (readprop == null) {
|
if (readprop == null) {
|
||||||
throw new IOException("Cannot find (resource.name = '" + unitName + "') DataSource");
|
throw new IOException("Cannot find (resource.name='" + unitName + "') DataSource");
|
||||||
}
|
}
|
||||||
if (writeprop == null) {
|
if (writeprop == null) {
|
||||||
writeprop = readprop;
|
writeprop = readprop;
|
||||||
|
|||||||
@@ -52,10 +52,10 @@ class CacheSourceLoader implements ResourceTypeLoader {
|
|||||||
field.set(srcObj, source);
|
field.set(srcObj, source);
|
||||||
Resource res = field.getAnnotation(Resource.class);
|
Resource res = field.getAnnotation(Resource.class);
|
||||||
if (res != null && res.required() && source == null) {
|
if (res != null && res.required() && source == null) {
|
||||||
throw new RedkaleException("CacheSource (resourceName = '" + resourceName + "') not found");
|
throw new RedkaleException("CacheSource (resourceName='" + resourceName + "') not found");
|
||||||
} else {
|
} else {
|
||||||
logger.info("Load CacheSource (type = "
|
logger.info("Load CacheSource (type="
|
||||||
+ (source == null ? null : source.getClass().getSimpleName()) + ", resourceName = '"
|
+ (source == null ? null : source.getClass().getSimpleName()) + ", resourceName='"
|
||||||
+ resourceName + "')");
|
+ resourceName + "')");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -379,7 +379,7 @@ public class SourceModuleEngine extends ModuleEngine implements SourceManager {
|
|||||||
if (!application.isCompileMode() && source instanceof Service) {
|
if (!application.isCompileMode() && source instanceof Service) {
|
||||||
((Service) source).init(sourceConf);
|
((Service) source).init(sourceConf);
|
||||||
}
|
}
|
||||||
logger.info("Load CacheSource resourceName = '" + sourceName + "', source = " + source + " in "
|
logger.info("Load CacheSource resourceName='" + sourceName + "', source=" + source + " in "
|
||||||
+ (System.currentTimeMillis() - st) + " ms");
|
+ (System.currentTimeMillis() - st) + " ms");
|
||||||
return source;
|
return source;
|
||||||
}
|
}
|
||||||
@@ -403,7 +403,7 @@ public class SourceModuleEngine extends ModuleEngine implements SourceManager {
|
|||||||
|
|
||||||
cacheSources.add(source);
|
cacheSources.add(source);
|
||||||
resourceFactory.register(sourceName, CacheSource.class, source);
|
resourceFactory.register(sourceName, CacheSource.class, source);
|
||||||
logger.info("Load CacheSource resourceName = '" + sourceName + "', source = " + source + " in "
|
logger.info("Load CacheSource resourceName='" + sourceName + "', source=" + source + " in "
|
||||||
+ (System.currentTimeMillis() - st) + " ms");
|
+ (System.currentTimeMillis() - st) + " ms");
|
||||||
return source;
|
return source;
|
||||||
} catch (RuntimeException ex) {
|
} catch (RuntimeException ex) {
|
||||||
@@ -450,7 +450,7 @@ public class SourceModuleEngine extends ModuleEngine implements SourceManager {
|
|||||||
}
|
}
|
||||||
dataSources.add(source);
|
dataSources.add(source);
|
||||||
resourceFactory.register(sourceName, DataSource.class, source);
|
resourceFactory.register(sourceName, DataSource.class, source);
|
||||||
logger.info("Load DataSource resourceName = '" + sourceName + "', source = " + source + " in "
|
logger.info("Load DataSource resourceName='" + sourceName + "', source=" + source + " in "
|
||||||
+ (System.currentTimeMillis() - st) + " ms");
|
+ (System.currentTimeMillis() - st) + " ms");
|
||||||
return source;
|
return source;
|
||||||
}
|
}
|
||||||
@@ -495,7 +495,7 @@ public class SourceModuleEngine extends ModuleEngine implements SourceManager {
|
|||||||
resourceFactory.register(sourceName, DataJdbcSource.class, source);
|
resourceFactory.register(sourceName, DataJdbcSource.class, source);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
logger.info("Load DataSource resourceName = '" + sourceName + "', source = " + source + " in "
|
logger.info("Load DataSource resourceName='" + sourceName + "', source=" + source + " in "
|
||||||
+ (System.currentTimeMillis() - st) + " ms");
|
+ (System.currentTimeMillis() - st) + " ms");
|
||||||
return source;
|
return source;
|
||||||
} catch (RuntimeException ex) {
|
} catch (RuntimeException ex) {
|
||||||
|
|||||||
Reference in New Issue
Block a user