001/** 002 * Copyright (c) 2015-2022, Michael Yang 杨福海 (fuhai999@gmail.com). 003 * <p> 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * <p> 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * <p> 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package io.jboot.components.cache.ehredis; 017 018import java.io.Serializable; 019 020 021public class JbootEhredisMessage implements Serializable { 022 023 public static final int ACTION_PUT = 1; 024 public static final int ACTION_REMOVE = 2; 025 public static final int ACTION_REMOVE_ALL = 3; 026 027 private String clientId; 028 private int action; 029 private String cacheName; 030 private Object key; 031 032 033 public JbootEhredisMessage() { 034 035 } 036 037 public JbootEhredisMessage(String clientId, int action, String cacheName, Object key) { 038 this.clientId = clientId; 039 this.action = action; 040 this.cacheName = cacheName; 041 this.key = key; 042 } 043 044 public String getClientId() { 045 return clientId; 046 } 047 048 public void setClientId(String clientId) { 049 this.clientId = clientId; 050 } 051 052 public int getAction() { 053 return action; 054 } 055 056 public void setAction(int action) { 057 this.action = action; 058 } 059 060 public String getCacheName() { 061 return cacheName; 062 } 063 064 public void setCacheName(String cacheName) { 065 this.cacheName = cacheName; 066 } 067 068 public Object getKey() { 069 return key; 070 } 071 072 public void setKey(Object key) { 073 this.key = key; 074 } 075 076}