/**
 * Copyright 2008-2009. Chongqing Communications Industry Services Co.,Ltd Information Technology Branch. All rights reserved.
 * <a>http://www.crunii.com</a>
 */
package com.crunii.micro.domain.common.hibernate.action;

import com.crunii.micro.domain.entitysql.main.TOperLogS;

import java.util.ArrayList;
import java.util.List;

/**
 * @author 田平 create 2021/5/20 11:18
 */
public class OperLogHolder {

	private static ThreadLocal<List<TOperLogS>> operLogs = ThreadLocal.withInitial(() -> {
		return new ArrayList<>(32);
	});

	public static void storeOperLogs(List<TOperLogS> logs) {
		operLogs.get().addAll(logs);
	}

	public static void clearCurrOperLogs() {
		operLogs.get().clear();
	}

	public static List<TOperLogS> getCurrOperLogs() {
		return operLogs.get();
	}

}
