Merge branch 'master' of github.com:redisson/redisson
commit
31ed55d391
@ -0,0 +1,43 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* interface for Lock object listener
|
||||||
|
*
|
||||||
|
* @author seakider
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface RObservable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds object event listener
|
||||||
|
*
|
||||||
|
* @see org.redisson.api.ExpiredObjectListener
|
||||||
|
* @see org.redisson.api.DeletedObjectListener
|
||||||
|
*
|
||||||
|
* @param listener - object event listener
|
||||||
|
* @return listener id
|
||||||
|
*/
|
||||||
|
int addListener(ObjectListener listener);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes object event listener
|
||||||
|
*
|
||||||
|
* @param listenerId - listener id
|
||||||
|
*/
|
||||||
|
void removeListener(int listenerId);
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Async interface for Lock object listener
|
||||||
|
*
|
||||||
|
* @author seakider
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface RObservableAsync {
|
||||||
|
/**
|
||||||
|
* Adds object event listener
|
||||||
|
*
|
||||||
|
* @see org.redisson.api.ExpiredObjectListener
|
||||||
|
* @see org.redisson.api.DeletedObjectListener
|
||||||
|
*
|
||||||
|
* @param listener - object event listener
|
||||||
|
* @return listener id
|
||||||
|
*/
|
||||||
|
RFuture<Integer> addListenerAsync(ObjectListener listener);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes object event listener
|
||||||
|
*
|
||||||
|
* @param listenerId - listener id
|
||||||
|
*/
|
||||||
|
RFuture<Void> removeListenerAsync(int listenerId);
|
||||||
|
}
|
@ -0,0 +1,45 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
|
||||||
|
import reactor.core.publisher.Mono;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Base Reactive interface for Lock object listener
|
||||||
|
*
|
||||||
|
* @author seakider
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface RObservableReactive {
|
||||||
|
/**
|
||||||
|
* Adds object event listener
|
||||||
|
*
|
||||||
|
* @see org.redisson.api.ExpiredObjectListener
|
||||||
|
* @see org.redisson.api.DeletedObjectListener
|
||||||
|
*
|
||||||
|
* @param listener - object event listener
|
||||||
|
* @return listener id
|
||||||
|
*/
|
||||||
|
Mono<Integer> addListener(ObjectListener listener);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes object event listener
|
||||||
|
*
|
||||||
|
* @param listenerId - listener id
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
Mono<Void> removeListener(int listenerId);
|
||||||
|
}
|
@ -0,0 +1,46 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
|
||||||
|
import io.reactivex.rxjava3.core.Completable;
|
||||||
|
import io.reactivex.rxjava3.core.Single;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Base RxJava2 interface for Lock object listener
|
||||||
|
*
|
||||||
|
* @author seakider
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface RObservableRx {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds object event listener
|
||||||
|
*
|
||||||
|
* @see org.redisson.api.ExpiredObjectListener
|
||||||
|
* @see org.redisson.api.DeletedObjectListener
|
||||||
|
*
|
||||||
|
* @param listener - object event listener
|
||||||
|
* @return listener id
|
||||||
|
*/
|
||||||
|
Single<Integer> addListener(ObjectListener listener);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes object event listener
|
||||||
|
*
|
||||||
|
* @param listenerId - listener id
|
||||||
|
*/
|
||||||
|
Completable removeListener(int listenerId);
|
||||||
|
}
|
Loading…
Reference in New Issue