Feature - Add listeners for RStream object #5552
parent
db7f391386
commit
81443fd413
@ -0,0 +1,37 @@
|
||||
/**
|
||||
* Copyright (c) 2013-2024 Nikita Koksharov
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.redisson.api.listener;
|
||||
|
||||
import org.redisson.api.ObjectListener;
|
||||
|
||||
/**
|
||||
* Redisson Object Event listener for <b>xadd</b> event
|
||||
* published by Redis when an element added into Stream.
|
||||
* <p>
|
||||
* Redis notify-keyspace-events setting should contain Et letters
|
||||
*
|
||||
* @author Nikita Koksharov
|
||||
*/
|
||||
public interface StreamAddListener extends ObjectListener {
|
||||
|
||||
/**
|
||||
* Invoked when a new entry is added to RStream object
|
||||
*
|
||||
* @param name object name
|
||||
*/
|
||||
void onAdd(String name);
|
||||
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
/**
|
||||
* Copyright (c) 2013-2024 Nikita Koksharov
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.redisson.api.listener;
|
||||
|
||||
import org.redisson.api.ObjectListener;
|
||||
|
||||
/**
|
||||
* Redisson Object Event listener for <b>xgroup-createconsumer</b> event
|
||||
* published by Redis when a Stream Consumer is created.
|
||||
* <p>
|
||||
* Redis notify-keyspace-events setting should contain Et letters
|
||||
*
|
||||
* @author Nikita Koksharov
|
||||
*/
|
||||
public interface StreamCreateConsumerListener extends ObjectListener {
|
||||
|
||||
/**
|
||||
* Invoked when a Stream Consumer is created
|
||||
*
|
||||
* @param name object name
|
||||
*/
|
||||
void onCreate(String name);
|
||||
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
/**
|
||||
* Copyright (c) 2013-2024 Nikita Koksharov
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.redisson.api.listener;
|
||||
|
||||
import org.redisson.api.ObjectListener;
|
||||
|
||||
/**
|
||||
* Redisson Object Event listener for <b>xgroup-create</b> event
|
||||
* published by Redis when a Stream Group is created.
|
||||
* <p>
|
||||
* Redis notify-keyspace-events setting should contain Et letters
|
||||
*
|
||||
* @author Nikita Koksharov
|
||||
*/
|
||||
public interface StreamCreateGroupListener extends ObjectListener {
|
||||
|
||||
/**
|
||||
* Invoked when a Stream Group is created
|
||||
*
|
||||
* @param name object name
|
||||
*/
|
||||
void onCreate(String name);
|
||||
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
/**
|
||||
* Copyright (c) 2013-2024 Nikita Koksharov
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.redisson.api.listener;
|
||||
|
||||
import org.redisson.api.ObjectListener;
|
||||
|
||||
/**
|
||||
* Redisson Object Event listener for <b>xgroup-delconsumer</b> event
|
||||
* published by Redis when a Stream Consumer is removed.
|
||||
* <p>
|
||||
* Redis notify-keyspace-events setting should contain Et letters
|
||||
*
|
||||
* @author Nikita Koksharov
|
||||
*/
|
||||
public interface StreamRemoveConsumerListener extends ObjectListener {
|
||||
|
||||
/**
|
||||
* Invoked when a Stream Consumer is removed
|
||||
*
|
||||
* @param name object name
|
||||
*/
|
||||
void onRemove(String name);
|
||||
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
/**
|
||||
* Copyright (c) 2013-2024 Nikita Koksharov
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.redisson.api.listener;
|
||||
|
||||
import org.redisson.api.ObjectListener;
|
||||
|
||||
/**
|
||||
* Redisson Object Event listener for <b>xgroup-destroy</b> event
|
||||
* published by Redis when a Stream Group is removed.
|
||||
* <p>
|
||||
* Redis notify-keyspace-events setting should contain Et letters
|
||||
*
|
||||
* @author Nikita Koksharov
|
||||
*/
|
||||
public interface StreamRemoveGroupListener extends ObjectListener {
|
||||
|
||||
/**
|
||||
* Invoked when a Stream Group is removed
|
||||
*
|
||||
* @param name object name
|
||||
*/
|
||||
void onRemove(String name);
|
||||
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
/**
|
||||
* Copyright (c) 2013-2024 Nikita Koksharov
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.redisson.api.listener;
|
||||
|
||||
import org.redisson.api.ObjectListener;
|
||||
|
||||
/**
|
||||
* Redisson Object Event listener for <b>srem</b> event
|
||||
* published by Redis when an element removed from Stream.
|
||||
* <p>
|
||||
* Redis notify-keyspace-events setting should contain Et letters
|
||||
*
|
||||
* @author Nikita Koksharov
|
||||
*/
|
||||
public interface StreamRemoveListener extends ObjectListener {
|
||||
|
||||
/**
|
||||
* Invoked when an element removed from Stream
|
||||
*
|
||||
* @param name object name
|
||||
*/
|
||||
void onRemove(String name);
|
||||
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
/**
|
||||
* Copyright (c) 2013-2024 Nikita Koksharov
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.redisson.api.listener;
|
||||
|
||||
import org.redisson.api.ObjectListener;
|
||||
|
||||
/**
|
||||
* Redisson Object Event listener for <b>ltrim</b> event
|
||||
* published by Redis when trim operation is executed for Stream.
|
||||
* <p>
|
||||
* Redis notify-keyspace-events setting should contain Et letters
|
||||
*
|
||||
* @author Nikita Koksharov
|
||||
*
|
||||
*/
|
||||
public interface StreamTrimListener extends ObjectListener {
|
||||
|
||||
/**
|
||||
* Invoked when trim operation is executed for Stream
|
||||
*
|
||||
* @param name - name of object
|
||||
*/
|
||||
void onTrim(String name);
|
||||
|
||||
}
|
Loading…
Reference in New Issue