<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[markfengfeng的博客]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/markfengfeng</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; markfengfeng]]></copyright><item><title><![CDATA[http缓存梳理]]></title><link>https://blog.csdn.net/markfengfeng/article/details/111027365</link><guid>https://blog.csdn.net/markfengfeng/article/details/111027365</guid><author>markfengfeng</author><pubDate>Fri, 11 Dec 2020 00:52:00 +0800</pubDate><description><![CDATA[借鉴并且摘抄了这篇博客的部分内容
http缓存详解，http缓存推荐方案
http请求和响应头的缓存字段
1. Cache-control
缓存控制头，http缓存控制的最高指令
no-store：所有内容都不缓存
no-cache：缓存，但是浏览器使用缓存前，都会请求浏览器判断缓存资源是否是最新
max-age=x：请求缓存后的X秒不再发起请求，属于http 1.1的属性，与 Expire(http 1.0) 类似，但是优先级比  Expires 。这是一个相对时间，expire是绝对时间。max-age]]></description><category></category></item><item><title><![CDATA[数据库锁的基本了解]]></title><link>https://blog.csdn.net/markfengfeng/article/details/110456385</link><guid>https://blog.csdn.net/markfengfeng/article/details/110456385</guid><author>markfengfeng</author><pubDate>Tue, 01 Dec 2020 23:01:53 +0800</pubDate><description><![CDATA[表锁
就是在数据表层面加锁。分别是有读锁和写锁。很好理解，读读兼容，写写，读写互斥。加锁的方式和释放方式如下。
lock table user write;
lock table user read;
unlock tables;

行锁
innodb可以给行加锁，相比表锁，这样可以减少加锁的粒度，减少锁的冲突，提高并发能力。行锁有以下两种。


共享锁(shared lock)：允许事务读行，使用共享锁后，其他事务可以获取相同数据集的共享锁，但是不能获得排他锁。手动加锁方式
select * from t]]></description><category></category></item><item><title><![CDATA[事务隔离级别示例]]></title><link>https://blog.csdn.net/markfengfeng/article/details/110455430</link><guid>https://blog.csdn.net/markfengfeng/article/details/110455430</guid><author>markfengfeng</author><pubDate>Tue, 01 Dec 2020 22:31:06 +0800</pubDate><description><![CDATA[mysql 数据库事务并发产生的问题：

脏读：读到没有提交的事务产生的数据

不可重复度：一个事务因为别的事务修改或者删除数据导致前后重复读的数据不一致

幻读：一个事务因为别的事务提交了数据，导致前后重复读第二次读取的数据更多

为了解决这些问题，mysql提供了以下事务隔离级别，不同隔离级别分别可以解决上述的问题。


			隔离级别
			
			
			脏读
			
			
			不可重复读
			
			
			幻读
			
		
			读未提交
			
			
			可能
			
			
		]]></description><category></category></item><item><title><![CDATA[微服务调用链路治理–Zipkin]]></title><link>https://blog.csdn.net/markfengfeng/article/details/109671422</link><guid>https://blog.csdn.net/markfengfeng/article/details/109671422</guid><author>markfengfeng</author><pubDate>Fri, 13 Nov 2020 11:27:31 +0800</pubDate><description><![CDATA[微服务调用链路治理–Zipkin
Zipkin 介绍
zipkin官方网站,点此进入
Zipkin是一个分布式链路调用监控系统，聚合各业务调用延迟数据，以达到链路调用监控跟踪
架构图如下

总体划分，zipkin 可以分为 client 和 server 两部分。
client 就是我们需要管理的各个服务，在各种调用行为的过程当中收集数据发送给server。
server 用于收集各个 client 上报的数据，存储，分析，以及展示等等。
Zipkin Server主要包括四个模块：

Collector ]]></description><category></category></item><item><title><![CDATA[Netty学习-CS模式的简单示例]]></title><link>https://blog.csdn.net/markfengfeng/article/details/109481384</link><guid>https://blog.csdn.net/markfengfeng/article/details/109481384</guid><author>markfengfeng</author><pubDate>Tue, 03 Nov 2020 22:59:46 +0800</pubDate><description><![CDATA[package timeserver;

import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelOption;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.N.]]></description><category></category></item><item><title><![CDATA[Netty学习-HTTPserver]]></title><link>https://blog.csdn.net/markfengfeng/article/details/109481412</link><guid>https://blog.csdn.net/markfengfeng/article/details/109481412</guid><author>markfengfeng</author><pubDate>Tue, 03 Nov 2020 22:59:38 +0800</pubDate><description><![CDATA[package httpserver;

import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channe]]></description><category></category></item><item><title><![CDATA[Netty学习-java对象的序列化]]></title><link>https://blog.csdn.net/markfengfeng/article/details/109481423</link><guid>https://blog.csdn.net/markfengfeng/article/details/109481423</guid><author>markfengfeng</author><pubDate>Tue, 03 Nov 2020 22:59:27 +0800</pubDate><description><![CDATA[package subscribeserver;

import io.netty.bootstrap.Bootstrap;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelOption;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.Nio]]></description><category></category></item><item><title><![CDATA[Netty学习-使用LineBasedFrameDecoder对粘包的处理]]></title><link>https://blog.csdn.net/markfengfeng/article/details/109481430</link><guid>https://blog.csdn.net/markfengfeng/article/details/109481430</guid><author>markfengfeng</author><pubDate>Tue, 03 Nov 2020 22:59:14 +0800</pubDate><description><![CDATA[解决粘包问题的示例
package timeserver;

import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelOption;
import io.netty.channel.EventLoopGroup;
import io.netty.chan]]></description><category></category></item><item><title><![CDATA[Java Stream 使用的简单示例]]></title><link>https://blog.csdn.net/markfengfeng/article/details/109172768</link><guid>https://blog.csdn.net/markfengfeng/article/details/109172768</guid><author>markfengfeng</author><pubDate>Tue, 20 Oct 2020 23:02:56 +0800</pubDate><description><![CDATA[一些简单示例，备忘
List&lt;Integer&gt; list = new ArrayList&lt;Integer&gt;(){{
			add(1);
			add(2);
			add(3);
			add(4);
			add(5);
			
		}};


		//@FunctionalInterface 装饰的接口可以用lambada表达式

		
		Consumer&lt;Integer&gt; echo = t -&gt; System.out.print(t + ", ");
		]]></description><category></category></item><item><title><![CDATA[线程池]]></title><link>https://blog.csdn.net/markfengfeng/article/details/106751702</link><guid>https://blog.csdn.net/markfengfeng/article/details/106751702</guid><author>markfengfeng</author><pubDate>Sun, 14 Jun 2020 21:06:04 +0800</pubDate><description><![CDATA[package multhread;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;

public class ExecutorsDemo implements Runnable{

	@Override]]></description><category></category></item><item><title><![CDATA[CountDownLatch 和 CyclicBarrier]]></title><link>https://blog.csdn.net/markfengfeng/article/details/106751673</link><guid>https://blog.csdn.net/markfengfeng/article/details/106751673</guid><author>markfengfeng</author><pubDate>Sun, 14 Jun 2020 21:05:03 +0800</pubDate><description><![CDATA[CountDownLatch 可以让线程阻塞在别的线程执行之后。

构造函数 new CountDownLatch(int count)。 count表示 countdown()要执行多少次，线程才能结束等待。
countdown() 表示上述构造函数的 count 减去1。当 count 为 0 的时候 await 结束

countDown
具体使用示例如下：
package multhread;

import java.util.concurrent.CountDownLatch;

public ]]></description><category></category></item><item><title><![CDATA[线程挂起和唤醒，LockSupport]]></title><link>https://blog.csdn.net/markfengfeng/article/details/106751663</link><guid>https://blog.csdn.net/markfengfeng/article/details/106751663</guid><author>markfengfeng</author><pubDate>Sun, 14 Jun 2020 21:04:25 +0800</pubDate><description><![CDATA[LockSupport 可以挂起和唤醒线程

park() 和 unpark() 是两个静态方法分别表示挂起和唤醒
unpark() 可以执行在 park() 之前。标识这个线程已经做过唤醒操作，线程会直接略过阻塞。

package multhread;

import java.util.concurrent.locks.LockSupport;

public class LockSupportDemo implements Runnable{
	@Override
	public void run(]]></description><category></category></item><item><title><![CDATA[读写锁，ReentrantReadWriteLock]]></title><link>https://blog.csdn.net/markfengfeng/article/details/106751655</link><guid>https://blog.csdn.net/markfengfeng/article/details/106751655</guid><author>markfengfeng</author><pubDate>Sun, 14 Jun 2020 21:03:56 +0800</pubDate><description><![CDATA[读写锁是为了减少读操作的互斥，提高执行效率。
同步具体表现为

读读不互斥
读写互斥
写写互斥

以下是一个基本的使用示例：
package multhread;

import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantReadWriteLock;

public class ReadWriteLockDemo{
	
	private static ReentrantReadWriteLock l]]></description><category></category></item><item><title><![CDATA[信号量，Semaphore]]></title><link>https://blog.csdn.net/markfengfeng/article/details/106751642</link><guid>https://blog.csdn.net/markfengfeng/article/details/106751642</guid><author>markfengfeng</author><pubDate>Sun, 14 Jun 2020 21:03:20 +0800</pubDate><description><![CDATA[信号量可以同时允许多个线程进入临界资源区。

new Semaphore(int permits) //构造函数中指定允许的线程数量
acquire() release() 分别表示获取信号量准许和释放准许

public class SemaphoreDemo implements Runnable {

	final Semaphore semp = new Semaphore(5);
	
	
	
	@Override
	public void run() {
		try {
			//当前线程获取信号]]></description><category></category></item><item><title><![CDATA[重入锁，ReentrantLock 和 Condition 的使用]]></title><link>https://blog.csdn.net/markfengfeng/article/details/106065604</link><guid>https://blog.csdn.net/markfengfeng/article/details/106065604</guid><author>markfengfeng</author><pubDate>Mon, 11 May 2020 23:36:05 +0800</pubDate><description><![CDATA[重入锁 ReentrantLock 主要特点：

容易控制加锁的粒度。lock unlock
等待锁的过程当中可以响应中断，lockInterruptibly
可以有限时间内尝试获取锁， tryLock
公平锁，尽量保证各个线程获取锁的公平
使用 Condition 对线程进行等待和唤醒

重入锁的基本使用 lock() 和 unlock() 分别加锁和释放锁，必须一一对应。
class RetrantLockDemo implements Runnable{

	private static Reentr]]></description><category></category></item><item><title><![CDATA[sql 中的 case 表达式]]></title><link>https://blog.csdn.net/markfengfeng/article/details/104584982</link><guid>https://blog.csdn.net/markfengfeng/article/details/104584982</guid><author>markfengfeng</author><pubDate>Sat, 29 Feb 2020 23:33:56 +0800</pubDate><description><![CDATA[case 表达式的基本用法
case when sex=1 then "男"
     when sex=2 then "女"
     else '其他' end
或者

case sex when 1 then "男"
         when 2 then "女"
         else '其他' end

注意事项

每个条件具有排他性，执行到符合条件的分支就不会继续执行下去。
th...]]></description><category></category></item><item><title><![CDATA[单例模式 - Head First设计模式学习]]></title><link>https://blog.csdn.net/markfengfeng/article/details/104584907</link><guid>https://blog.csdn.net/markfengfeng/article/details/104584907</guid><author>markfengfeng</author><pubDate>Sat, 29 Feb 2020 23:31:40 +0800</pubDate><description><![CDATA[单例模式是比较简单的设计模式。直接给出定义就明白了。
单例模式确保一个类只有一个实例，并提供一个全局访问点
要保证一个类只有一个实例需要做到以下几点：

私有类构造器，防止别的类直接用类构造器实例化实例
既然构造器私有了，那么只有类本身能够实例化。类需要提供一个公开的接口获取实例
类本身需要保证实例的单一

类图如下:

类怎么创建单一的实例,有以下几种办法：
错误的示范
public class...]]></description><category></category></item><item><title><![CDATA[装饰者模式 - Head First设计模式学习（二）]]></title><link>https://blog.csdn.net/markfengfeng/article/details/104100452</link><guid>https://blog.csdn.net/markfengfeng/article/details/104100452</guid><author>markfengfeng</author><pubDate>Tue, 28 Jan 2020 17:10:48 +0800</pubDate><description><![CDATA[咖啡店因为业务扩张，准备更新自己的订单系统，以合乎他们的饮料供应要求。
原先设计的类是这样的：



Beverage(饮料)是一个抽象类，店内提供的饮料都必须继承自此类。


cost()方法是抽象的，子类必须定义自己的实现。通过cost()来返回饮料的价钱。


购买咖啡时，也可以要求在其中加入各种调料，例如 蒸奶（Steam Milk），豆浆（Soy），摩卡（Mocha）等等。
那么如果按照...]]></description><category></category></item><item><title><![CDATA[egg 学习与分享]]></title><link>https://blog.csdn.net/markfengfeng/article/details/103072078</link><guid>https://blog.csdn.net/markfengfeng/article/details/103072078</guid><author>markfengfeng</author><pubDate>Thu, 16 Jan 2020 22:30:30 +0800</pubDate><description><![CDATA[egg 学习与分享
什么是 egg
egg.js是基于koa为底层，由阿里nodejs团队封装的企业级Web应用解决方案，以约束和规范化团队开发，帮助开
发团队和开发人员降低开发和维护成本为核心设计理念的优秀解决方案。
官方文档地址：
https://eggjs.org/zh-cn/index.html
创建一个 egg 应用
创建工程目录，进入工程目录下执行以下命令，初始化一个基本的 egg 工...]]></description><category></category></item><item><title><![CDATA[等待线程结束 join 和谦让 yield]]></title><link>https://blog.csdn.net/markfengfeng/article/details/104012079</link><guid>https://blog.csdn.net/markfengfeng/article/details/104012079</guid><author>markfengfeng</author><pubDate>Thu, 16 Jan 2020 22:29:42 +0800</pubDate><description><![CDATA[join 表示当前线程要等待目标线程执行结束，然后继续执行当前线程。
join有两个api.分别是
//无限等待
public final void join() throws InterruptedException

//设置最长的等待时间，到了限制时间就不等待了
public final syschronized void join(long millis) throws Interrupt...]]></description><category></category></item></channel></rss>