本文整理了Java中lombok.extern.slf4j.Slf4j
类的一些代码示例,展示了Slf4j
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Slf4j
类的具体详情如下:
包路径:lombok.extern.slf4j.Slf4j
类名称:Slf4j
暂无
代码示例来源:origin: elasticjob/elastic-job-lite
/**
* 默认作业异常处理器.
*
* @author zhangliang
*/
@Slf4j
public final class DefaultJobExceptionHandler implements JobExceptionHandler {
@Override
public void handleException(final String jobName, final Throwable cause) {
log.error(String.format("Job '%s' exception occur in job processing", jobName), cause);
}
}
代码示例来源:origin: apache/incubator-shardingsphere
/**
* PostgreSQL parse complete packet.
*
* @author zhangyonglun
*/
@Slf4j
public final class PostgreSQLParseCompletePacket implements PostgreSQLPacket {
@Getter
private final char messageType = PostgreSQLCommandPacketType.PARSE_COMPLETE.getValue();
@Override
public void write(final PostgreSQLPacketPayload payload) {
}
@Override
public int getSequenceId() {
return 0;
}
}
代码示例来源:origin: apache/incubator-shardingsphere
/**
* PostgreSQL bind complete packet.
*
* @author zhangyonglun
*/
@Slf4j
public final class PostgreSQLBindCompletePacket implements PostgreSQLPacket {
@Getter
private final char messageType = PostgreSQLCommandPacketType.BIND_COMPLETE.getValue();
@Override
public void write(final PostgreSQLPacketPayload payload) {
}
@Override
public int getSequenceId() {
return 0;
}
}
代码示例来源:origin: apache/pulsar
/**
* Example Function that acts on a window of tuples at a time rather than per tuple basis.
*/
@Slf4j
public class AddWindowFunction implements Function <Collection<Integer>, Integer> {
@Override
public Integer apply(Collection<Integer> integers) {
return integers.stream().reduce(0, (x, y) -> x + y);
}
}
代码示例来源:origin: apache/incubator-shardingsphere
/**
* PostgreSQL command sync packet.
*
* @author zhangyonglun
*/
@Slf4j
public final class PostgreSQLComSyncPacket implements PostgreSQLCommandPacket {
@Getter
private final char messageType = PostgreSQLCommandPacketType.SYNC.getValue();
public PostgreSQLComSyncPacket(final PostgreSQLPacketPayload payload) {
payload.readInt4();
}
@Override
public void write(final PostgreSQLPacketPayload payload) {
}
@Override
public Optional<PostgreSQLCommandResponsePackets> execute() {
return Optional.absent();
}
@Override
public int getSequenceId() {
return 0;
}
}
代码示例来源:origin: apache/pulsar
/**
* Example Function that acts on a window of tuples at a time rather than per tuple basis.
*/
@Slf4j
public class ContextWindowFunction implements WindowFunction<Integer, Integer> {
@Override
public Integer process(Collection<Record<Integer>> integers, WindowContext context) {
Integer retval = 0;
for (Record<Integer> record : integers) {
retval += record.getValue();
}
return retval;
}
}
代码示例来源:origin: apache/incubator-shardingsphere
/**
* PostgreSQL command termination packet.
*
* @author zhangyonglun
*/
@Slf4j
public final class PostgreSQLComTerminationPacket implements PostgreSQLCommandPacket {
@Getter
private final char messageType = PostgreSQLCommandPacketType.TERMINATE.getValue();
public PostgreSQLComTerminationPacket(final PostgreSQLPacketPayload payload) {
payload.readInt4();
}
@Override
public void write(final PostgreSQLPacketPayload payload) {
}
@Override
public Optional<PostgreSQLCommandResponsePackets> execute() {
return Optional.absent();
}
@Override
public int getSequenceId() {
return 0;
}
}
代码示例来源:origin: codingapi/tx-lcn
/**
* @author lorne
*/
@Slf4j
public class ObjectSerializerEncoder extends MessageToByteEncoder<Serializable> {
@Override
protected void encode(ChannelHandlerContext ctx, Serializable msg, ByteBuf out) throws Exception {
ByteBufOutputStream bout = new ByteBufOutputStream(out);
SerializerContext.getInstance().serialize(msg,bout);
}
}
代码示例来源:origin: apache/incubator-shardingsphere
@Slf4j
public final class ComStmtClosePacket implements CommandPacket {
@Getter
private final int sequenceId;
代码示例来源:origin: lets-blade/blade
@Slf4j
public class ViewBody implements Body {
private final ModelAndView modelAndView;
public ViewBody(ModelAndView modelAndView) {
this.modelAndView = modelAndView;
}
public static ViewBody of(ModelAndView modelAndView){
return new ViewBody(modelAndView);
}
public ModelAndView modelAndView() {
return modelAndView;
}
@Override
public FullHttpResponse write(BodyWriter writer) {
return writer.onView(this);
}
}
代码示例来源:origin: apache/incubator-shardingsphere
@Slf4j
public final class PostgreSQLComExecutePacket implements PostgreSQLCommandPacket {
@Getter
private final char messageType = PostgreSQLCommandPacketType.EXECUTE.getValue();
代码示例来源:origin: lets-blade/blade
@Slf4j
public class ViewBody implements Body {
private final ModelAndView modelAndView;
public ViewBody(ModelAndView modelAndView) {
this.modelAndView = modelAndView;
}
public static ViewBody of(ModelAndView modelAndView){
return new ViewBody(modelAndView);
}
public ModelAndView modelAndView() {
return modelAndView;
}
@Override
public FullHttpResponse write(BodyWriter writer) {
return writer.onView(this);
}
}
代码示例来源:origin: apache/incubator-shardingsphere
@Slf4j
public final class ComStmtClosePacket implements CommandPacket {
@Getter
private final int sequenceId;
代码示例来源:origin: LogNet/grpc-spring-boot-starter
@Slf4j
public class NotSpringBeanInterceptor implements ServerInterceptor {
@Override
public <ReqT, RespT> ServerCall.Listener<ReqT> interceptCall(ServerCall<ReqT, RespT> call, Metadata headers,
ServerCallHandler<ReqT, RespT> next) {
System.out.println("I'm not Spring bean interceptor and still being invoked...");
return next.startCall(call, headers);
}
}
代码示例来源:origin: apache/incubator-shardingsphere
@Slf4j
public final class PostgreSQLComDescribePacket implements PostgreSQLCommandPacket {
@Getter
private final char messageType = PostgreSQLCommandPacketType.DESCRIBE.getValue();
代码示例来源:origin: deeplearning4j/nd4j
/**
* @author raver119@gmail.com
*/
@Slf4j
public class ImmortalFloatPointer extends FloatPointer {
private Pointer pointer;
public ImmortalFloatPointer(PagedPointer pointer) {
this.pointer = pointer;
this.address = pointer.address();
this.capacity = pointer.capacity();
this.limit = pointer.limit();
this.position = 0;
}
}
代码示例来源:origin: elasticjob/elastic-job-lite
/**
* 事件追踪数据源.
*
* @author zhangxinguo
*/
@Slf4j
public final class EventTraceDataSource {
@Getter(AccessLevel.PROTECTED)
private EventTraceDataSourceConfiguration eventTraceDataSourceConfiguration;
public EventTraceDataSource(final EventTraceDataSourceConfiguration eventTraceDataSourceConfiguration) {
this.eventTraceDataSourceConfiguration = eventTraceDataSourceConfiguration;
}
/**
* 初始化.
*/
public void init() {
log.debug("Elastic job: data source init, connection url is: {}.", eventTraceDataSourceConfiguration.getUrl());
try {
Class.forName(eventTraceDataSourceConfiguration.getDriver());
DriverManager.getConnection(eventTraceDataSourceConfiguration.getUrl(), eventTraceDataSourceConfiguration.getUsername(), eventTraceDataSourceConfiguration.getPassword());
} catch (final ClassNotFoundException | SQLException ex) {
throw new RuntimeException(ex);
}
}
}
代码示例来源:origin: codingapi/tx-lcn
/**
* @author lorne
*/
@Slf4j
public class ObjectSerializerDecoder extends MessageToMessageDecoder<ByteBuf> {
@Override
protected void decode(ChannelHandlerContext ctx, ByteBuf msg, List<Object> out) throws Exception {
if(msg==null){
return;
}
ByteBufInputStream byteBufInputStream = new ByteBufInputStream(msg, true);
NettyRpcCmd object = SerializerContext.getInstance().deSerialize(byteBufInputStream, NettyRpcCmd.class);
out.add(object);
}
}
代码示例来源:origin: apache/incubator-shardingsphere
@Slf4j
public final class ComInitDbPacket implements CommandPacket {
@Getter
private final int sequenceId;
代码示例来源:origin: hs-web/hsweb-framework
/**
* @author zhouhao
* @since 3.0.0-RC
*/
@Component
@Slf4j
public class NotNullStrategy extends AbstractStrategy {
@Override
protected Class<NotNull> getAnnotationType() {
return NotNull.class;
}
}
内容来源于网络,如有侵权,请联系作者删除!