From 4a7c5e67a4061e222482e42f81977cc4e1a24baf Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Fri, 6 Sep 2024 07:49:58 -0700 Subject: [PATCH 1/4] - Update to later version of the protobuf tool chain - Update protobuf generation to produce .pyi files (this resolves some of the missing dependency errors seen in the IDE) - Re-generate the stubs from the latest protobuf files (exposes new features from the proxy) - Fix issues found by latest mypy refresh --- .pre-commit-config.yaml | 6 +- Makefile | 2 +- pyproject.toml | 7 +- src/coherence/client.py | 2 +- src/coherence/event.py | 8 +- src/coherence/messages_pb2.py | 136 ++++---- src/coherence/messages_pb2.pyi | 482 +++++++++++++++++++++++++++++ src/coherence/services_pb2.py | 4 +- src/coherence/services_pb2.pyi | 8 + src/coherence/services_pb2_grpc.py | 34 ++ src/coherence/util.py | 2 +- 11 files changed, 608 insertions(+), 83 deletions(-) create mode 100644 src/coherence/messages_pb2.pyi create mode 100644 src/coherence/services_pb2.pyi diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 31df9e8..ad3017f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,17 +16,17 @@ repos: - id: check-added-large-files - repo: https://github.com/PyCQA/flake8 - rev: 7.0.0 + rev: 7.1.1 hooks: - id: flake8 - repo: https://github.com/psf/black - rev: 24.4.2 + rev: 24.8.0 hooks: - id: black - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.10.0 + rev: v1.11.2 hooks: - id: mypy diff --git a/Makefile b/Makefile index 8ac090e..3bf64a0 100644 --- a/Makefile +++ b/Makefile @@ -112,7 +112,7 @@ generate-proto: ## Generate Proto Files mkdir -p $(PROTO_DIR) || true curl -o $(PROTO_DIR)/services.proto https://raw.githubusercontent.com/oracle/coherence/$(COHERENCE_VERSION)/prj/coherence-grpc/src/main/proto/services.proto curl -o $(PROTO_DIR)/messages.proto https://raw.githubusercontent.com/oracle/coherence/$(COHERENCE_VERSION)/prj/coherence-grpc/src/main/proto/messages.proto - python -m grpc_tools.protoc --proto_path=$(CURRDIR)/etc/proto --python_out=$(CURRDIR)/src/coherence --grpc_python_out=$(CURRDIR)/src/coherence $(CURRDIR)/etc/proto/messages.proto $(CURRDIR)/etc/proto/services.proto + python -m grpc_tools.protoc --proto_path=$(CURRDIR)/etc/proto --pyi_out=$(CURRDIR)/src/coherence --python_out=$(CURRDIR)/src/coherence --grpc_python_out=$(CURRDIR)/src/coherence $(CURRDIR)/etc/proto/messages.proto $(CURRDIR)/etc/proto/services.proto sed -e 's/import messages_pb2 as messages__pb2/import coherence.messages_pb2 as messages__pb2/' \ < $(CURRDIR)/src/coherence/services_pb2_grpc.py > $(CURRDIR)/src/coherence/services_pb2_grpc.py.out mv $(CURRDIR)/src/coherence/services_pb2_grpc.py.out $(CURRDIR)/src/coherence/services_pb2_grpc.py diff --git a/pyproject.toml b/pyproject.toml index baf1843..fed1ad5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,12 +22,11 @@ classifiers = [ [tool.poetry.dependencies] python = "^3.8" -protobuf = ">=4.23,<4.26" -grpcio = ">=1.54,<1.67" -grpcio-tools = ">=1.54,<1.63" +protobuf = "5.28.0" +grpcio = "1.66.1" +grpcio-tools = "1.66.1" jsonpickle = ">=3.0,<3.4" pymitter = ">=0.4,<0.6" -typing-extensions = ">=4.11,<4.13" [tool.poetry.dev-dependencies] pytest = "~8.3" diff --git a/src/coherence/client.py b/src/coherence/client.py index 4aefc7e..14a061d 100644 --- a/src/coherence/client.py +++ b/src/coherence/client.py @@ -38,7 +38,7 @@ from .event import MapLifecycleEvent, MapListener, SessionLifecycleEvent from .extractor import ValueExtractor from .filter import Filter -from .messages_pb2 import PageRequest # type: ignore +from .messages_pb2 import PageRequest from .processor import EntryProcessor from .serialization import Serializer, SerializerRegistry from .services_pb2_grpc import NamedCacheServiceStub diff --git a/src/coherence/event.py b/src/coherence/event.py index a7af2a2..bd4ad0f 100644 --- a/src/coherence/event.py +++ b/src/coherence/event.py @@ -17,7 +17,7 @@ import coherence.client from .filter import Filter, Filters, MapEventFilter -from .messages_pb2 import MapEventResponse, MapListenerRequest, MapListenerResponse # type: ignore +from .messages_pb2 import MapEventResponse, MapListenerRequest, MapListenerResponse from .serialization import Serializer from .services_pb2_grpc import NamedCacheServiceStub from .util import RequestFactory @@ -104,9 +104,9 @@ def __init__( self._name: str = source.name self._source: coherence.client.NamedMap[K, V] = source self._serializer: Serializer = serializer - self._key_bytes: bytearray = response.key - self._new_value_bytes: bytearray = response.newValue - self._old_value_bytes: bytearray = response.oldValue + self._key_bytes: bytes = response.key + self._new_value_bytes: bytes = response.newValue + self._old_value_bytes: bytes = response.oldValue @property def source(self) -> coherence.client.NamedMap[K, V]: diff --git a/src/coherence/messages_pb2.py b/src/coherence/messages_pb2.py index a374122..ea0b3a1 100644 --- a/src/coherence/messages_pb2.py +++ b/src/coherence/messages_pb2.py @@ -13,7 +13,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0emessages.proto\x12\tcoherence\",\n\x0c\x43learRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\"`\n\x14\x43ontainsEntryRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\x0c\x12\r\n\x05value\x18\x05 \x01(\x0c\"O\n\x12\x43ontainsKeyRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\x0c\"S\n\x14\x43ontainsValueRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\r\n\x05value\x18\x04 \x01(\x0c\".\n\x0e\x44\x65stroyRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\".\n\x0eIsEmptyRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\"+\n\x0bSizeRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\"G\n\nGetRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\x0c\"J\n\rGetAllRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x03(\x0c\"c\n\nPutRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\x0c\x12\r\n\x05value\x18\x05 \x01(\x0c\x12\x0b\n\x03ttl\x18\x06 \x01(\x03\"^\n\rPutAllRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x1f\n\x05\x65ntry\x18\x04 \x03(\x0b\x32\x10.coherence.Entry\"k\n\x12PutIfAbsentRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\x0c\x12\r\n\x05value\x18\x05 \x01(\x0c\x12\x0b\n\x03ttl\x18\x06 \x01(\x03\"J\n\rRemoveRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\x0c\"`\n\x14RemoveMappingRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\x0c\x12\r\n\x05value\x18\x05 \x01(\x0c\"Z\n\x0eReplaceRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\x0c\x12\r\n\x05value\x18\x05 \x01(\x0c\"{\n\x15ReplaceMappingRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\x0c\x12\x15\n\rpreviousValue\x18\x05 \x01(\x0c\x12\x10\n\x08newValue\x18\x06 \x01(\x0c\"K\n\x0bPageRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x0e\n\x06\x63ookie\x18\x04 \x01(\x0c\"9\n\x0b\x45ntryResult\x12\x0b\n\x03key\x18\x01 \x01(\x0c\x12\r\n\x05value\x18\x02 \x01(\x0c\x12\x0e\n\x06\x63ookie\x18\x03 \x01(\x0c\"#\n\x05\x45ntry\x12\x0b\n\x03key\x18\x01 \x01(\x0c\x12\r\n\x05value\x18\x02 \x01(\x0c\"/\n\x0fTruncateRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\"v\n\x0f\x41\x64\x64IndexRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x11\n\textractor\x18\x04 \x01(\x0c\x12\x0e\n\x06sorted\x18\x05 \x01(\x08\x12\x12\n\ncomparator\x18\x06 \x01(\x0c\"U\n\x12RemoveIndexRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x11\n\textractor\x18\x04 \x01(\x0c\"r\n\x10\x41ggregateRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x12\n\naggregator\x18\x04 \x01(\x0c\x12\x0c\n\x04keys\x18\x05 \x03(\x0c\x12\x0e\n\x06\x66ilter\x18\x06 \x01(\x0c\"]\n\rInvokeRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x11\n\tprocessor\x18\x04 \x01(\x0c\x12\x0b\n\x03key\x18\x05 \x01(\x0c\"q\n\x10InvokeAllRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x11\n\tprocessor\x18\x04 \x01(\x0c\x12\x0c\n\x04keys\x18\x05 \x03(\x0c\x12\x0e\n\x06\x66ilter\x18\x06 \x01(\x0c\"c\n\x0f\x45ntrySetRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\x0c\x12\x12\n\ncomparator\x18\x05 \x01(\x0c\"M\n\rKeySetRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\x0c\"a\n\rValuesRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\x0c\x12\x12\n\ncomparator\x18\x05 \x01(\x0c\"/\n\rOptionalValue\x12\x0f\n\x07present\x18\x01 \x01(\x08\x12\r\n\x05value\x18\x02 \x01(\x0c\"\xa8\x02\n\x12MapListenerRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x0b\n\x03uid\x18\x04 \x01(\t\x12\x37\n\x04type\x18\x05 \x01(\x0e\x32).coherence.MapListenerRequest.RequestType\x12\x0e\n\x06\x66ilter\x18\x06 \x01(\x0c\x12\x0b\n\x03key\x18\x07 \x01(\x0c\x12\x0c\n\x04lite\x18\x08 \x01(\x08\x12\x11\n\tsubscribe\x18\t \x01(\x08\x12\x0f\n\x07priming\x18\n \x01(\x08\x12\x0f\n\x07trigger\x18\x0b \x01(\x0c\x12\x10\n\x08\x66ilterId\x18\x0c \x01(\x03\",\n\x0bRequestType\x12\x08\n\x04INIT\x10\x00\x12\x07\n\x03KEY\x10\x01\x12\n\n\x06\x46ILTER\x10\x02\"\xfe\x02\n\x13MapListenerResponse\x12>\n\nsubscribed\x18\x01 \x01(\x0b\x32(.coherence.MapListenerSubscribedResponseH\x00\x12\x42\n\x0cunsubscribed\x18\x02 \x01(\x0b\x32*.coherence.MapListenerUnsubscribedResponseH\x00\x12,\n\x05\x65vent\x18\x03 \x01(\x0b\x32\x1b.coherence.MapEventResponseH\x00\x12\x34\n\x05\x65rror\x18\x04 \x01(\x0b\x32#.coherence.MapListenerErrorResponseH\x00\x12\x36\n\tdestroyed\x18\x05 \x01(\x0b\x32!.coherence.CacheDestroyedResponseH\x00\x12\x36\n\ttruncated\x18\x06 \x01(\x0b\x32!.coherence.CacheTruncatedResponseH\x00\x42\x0f\n\rresponse_type\",\n\x1dMapListenerSubscribedResponse\x12\x0b\n\x03uid\x18\x01 \x01(\t\".\n\x1fMapListenerUnsubscribedResponse\x12\x0b\n\x03uid\x18\x01 \x01(\t\"\'\n\x16\x43\x61\x63heDestroyedResponse\x12\r\n\x05\x63\x61\x63he\x18\x01 \x01(\t\"\'\n\x16\x43\x61\x63heTruncatedResponse\x12\r\n\x05\x63\x61\x63he\x18\x01 \x01(\t\"U\n\x18MapListenerErrorResponse\x12\x0b\n\x03uid\x18\x01 \x01(\t\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x0c\n\x04\x63ode\x18\x03 \x01(\x05\x12\r\n\x05stack\x18\x04 \x03(\t\"\xa6\x02\n\x10MapEventResponse\x12\n\n\x02id\x18\x01 \x01(\x05\x12\x0b\n\x03key\x18\x02 \x01(\x0c\x12\x10\n\x08newValue\x18\x03 \x01(\x0c\x12\x10\n\x08oldValue\x18\x04 \x01(\x0c\x12L\n\x13transformationState\x18\x05 \x01(\x0e\x32/.coherence.MapEventResponse.TransformationState\x12\x11\n\tfilterIds\x18\x06 \x03(\x03\x12\x11\n\tsynthetic\x18\x07 \x01(\x08\x12\x0f\n\x07priming\x18\x08 \x01(\x08\"P\n\x13TransformationState\x12\x15\n\x11NON_TRANSFORMABLE\x10\x00\x12\x11\n\rTRANSFORMABLE\x10\x01\x12\x0f\n\x0bTRANSFORMED\x10\x02\x42\x1d\n\x19\x63om.oracle.coherence.grpcP\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0emessages.proto\x12\tcoherence\",\n\x0c\x43learRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\"`\n\x14\x43ontainsEntryRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\x0c\x12\r\n\x05value\x18\x05 \x01(\x0c\"O\n\x12\x43ontainsKeyRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\x0c\"S\n\x14\x43ontainsValueRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\r\n\x05value\x18\x04 \x01(\x0c\".\n\x0e\x44\x65stroyRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\".\n\x0eIsEmptyRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\".\n\x0eIsReadyRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\"+\n\x0bSizeRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\"G\n\nGetRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\x0c\"J\n\rGetAllRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x03(\x0c\"c\n\nPutRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\x0c\x12\r\n\x05value\x18\x05 \x01(\x0c\x12\x0b\n\x03ttl\x18\x06 \x01(\x03\"k\n\rPutAllRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x1f\n\x05\x65ntry\x18\x04 \x03(\x0b\x32\x10.coherence.Entry\x12\x0b\n\x03ttl\x18\x06 \x01(\x03\"k\n\x12PutIfAbsentRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\x0c\x12\r\n\x05value\x18\x05 \x01(\x0c\x12\x0b\n\x03ttl\x18\x06 \x01(\x03\"J\n\rRemoveRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\x0c\"`\n\x14RemoveMappingRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\x0c\x12\r\n\x05value\x18\x05 \x01(\x0c\"Z\n\x0eReplaceRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\x0c\x12\r\n\x05value\x18\x05 \x01(\x0c\"{\n\x15ReplaceMappingRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\x0c\x12\x15\n\rpreviousValue\x18\x05 \x01(\x0c\x12\x10\n\x08newValue\x18\x06 \x01(\x0c\"K\n\x0bPageRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x0e\n\x06\x63ookie\x18\x04 \x01(\x0c\"9\n\x0b\x45ntryResult\x12\x0b\n\x03key\x18\x01 \x01(\x0c\x12\r\n\x05value\x18\x02 \x01(\x0c\x12\x0e\n\x06\x63ookie\x18\x03 \x01(\x0c\"#\n\x05\x45ntry\x12\x0b\n\x03key\x18\x01 \x01(\x0c\x12\r\n\x05value\x18\x02 \x01(\x0c\"/\n\x0fTruncateRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\"v\n\x0f\x41\x64\x64IndexRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x11\n\textractor\x18\x04 \x01(\x0c\x12\x0e\n\x06sorted\x18\x05 \x01(\x08\x12\x12\n\ncomparator\x18\x06 \x01(\x0c\"U\n\x12RemoveIndexRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x11\n\textractor\x18\x04 \x01(\x0c\"r\n\x10\x41ggregateRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x12\n\naggregator\x18\x04 \x01(\x0c\x12\x0c\n\x04keys\x18\x05 \x03(\x0c\x12\x0e\n\x06\x66ilter\x18\x06 \x01(\x0c\"]\n\rInvokeRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x11\n\tprocessor\x18\x04 \x01(\x0c\x12\x0b\n\x03key\x18\x05 \x01(\x0c\"q\n\x10InvokeAllRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x11\n\tprocessor\x18\x04 \x01(\x0c\x12\x0c\n\x04keys\x18\x05 \x03(\x0c\x12\x0e\n\x06\x66ilter\x18\x06 \x01(\x0c\"c\n\x0f\x45ntrySetRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\x0c\x12\x12\n\ncomparator\x18\x05 \x01(\x0c\"M\n\rKeySetRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\x0c\"a\n\rValuesRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\x0c\x12\x12\n\ncomparator\x18\x05 \x01(\x0c\"/\n\rOptionalValue\x12\x0f\n\x07present\x18\x01 \x01(\x08\x12\r\n\x05value\x18\x02 \x01(\x0c\"\xa8\x02\n\x12MapListenerRequest\x12\r\n\x05scope\x18\x01 \x01(\t\x12\r\n\x05\x63\x61\x63he\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x0b\n\x03uid\x18\x04 \x01(\t\x12\x37\n\x04type\x18\x05 \x01(\x0e\x32).coherence.MapListenerRequest.RequestType\x12\x0e\n\x06\x66ilter\x18\x06 \x01(\x0c\x12\x0b\n\x03key\x18\x07 \x01(\x0c\x12\x0c\n\x04lite\x18\x08 \x01(\x08\x12\x11\n\tsubscribe\x18\t \x01(\x08\x12\x0f\n\x07priming\x18\n \x01(\x08\x12\x0f\n\x07trigger\x18\x0b \x01(\x0c\x12\x10\n\x08\x66ilterId\x18\x0c \x01(\x03\",\n\x0bRequestType\x12\x08\n\x04INIT\x10\x00\x12\x07\n\x03KEY\x10\x01\x12\n\n\x06\x46ILTER\x10\x02\"\xfe\x02\n\x13MapListenerResponse\x12>\n\nsubscribed\x18\x01 \x01(\x0b\x32(.coherence.MapListenerSubscribedResponseH\x00\x12\x42\n\x0cunsubscribed\x18\x02 \x01(\x0b\x32*.coherence.MapListenerUnsubscribedResponseH\x00\x12,\n\x05\x65vent\x18\x03 \x01(\x0b\x32\x1b.coherence.MapEventResponseH\x00\x12\x34\n\x05\x65rror\x18\x04 \x01(\x0b\x32#.coherence.MapListenerErrorResponseH\x00\x12\x36\n\tdestroyed\x18\x05 \x01(\x0b\x32!.coherence.CacheDestroyedResponseH\x00\x12\x36\n\ttruncated\x18\x06 \x01(\x0b\x32!.coherence.CacheTruncatedResponseH\x00\x42\x0f\n\rresponse_type\",\n\x1dMapListenerSubscribedResponse\x12\x0b\n\x03uid\x18\x01 \x01(\t\".\n\x1fMapListenerUnsubscribedResponse\x12\x0b\n\x03uid\x18\x01 \x01(\t\"\'\n\x16\x43\x61\x63heDestroyedResponse\x12\r\n\x05\x63\x61\x63he\x18\x01 \x01(\t\"\'\n\x16\x43\x61\x63heTruncatedResponse\x12\r\n\x05\x63\x61\x63he\x18\x01 \x01(\t\"U\n\x18MapListenerErrorResponse\x12\x0b\n\x03uid\x18\x01 \x01(\t\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x0c\n\x04\x63ode\x18\x03 \x01(\x05\x12\r\n\x05stack\x18\x04 \x03(\t\"\xa6\x02\n\x10MapEventResponse\x12\n\n\x02id\x18\x01 \x01(\x05\x12\x0b\n\x03key\x18\x02 \x01(\x0c\x12\x10\n\x08newValue\x18\x03 \x01(\x0c\x12\x10\n\x08oldValue\x18\x04 \x01(\x0c\x12L\n\x13transformationState\x18\x05 \x01(\x0e\x32/.coherence.MapEventResponse.TransformationState\x12\x11\n\tfilterIds\x18\x06 \x03(\x03\x12\x11\n\tsynthetic\x18\x07 \x01(\x08\x12\x0f\n\x07priming\x18\x08 \x01(\x08\"P\n\x13TransformationState\x12\x15\n\x11NON_TRANSFORMABLE\x10\x00\x12\x11\n\rTRANSFORMABLE\x10\x01\x12\x0f\n\x0bTRANSFORMED\x10\x02\x42\x1d\n\x19\x63om.oracle.coherence.grpcP\x01\x62\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'messages_pb2', globals()) @@ -33,70 +33,72 @@ _DESTROYREQUEST._serialized_end=385 _ISEMPTYREQUEST._serialized_start=387 _ISEMPTYREQUEST._serialized_end=433 - _SIZEREQUEST._serialized_start=435 - _SIZEREQUEST._serialized_end=478 - _GETREQUEST._serialized_start=480 - _GETREQUEST._serialized_end=551 - _GETALLREQUEST._serialized_start=553 - _GETALLREQUEST._serialized_end=627 - _PUTREQUEST._serialized_start=629 - _PUTREQUEST._serialized_end=728 - _PUTALLREQUEST._serialized_start=730 - _PUTALLREQUEST._serialized_end=824 - _PUTIFABSENTREQUEST._serialized_start=826 - _PUTIFABSENTREQUEST._serialized_end=933 - _REMOVEREQUEST._serialized_start=935 - _REMOVEREQUEST._serialized_end=1009 - _REMOVEMAPPINGREQUEST._serialized_start=1011 - _REMOVEMAPPINGREQUEST._serialized_end=1107 - _REPLACEREQUEST._serialized_start=1109 - _REPLACEREQUEST._serialized_end=1199 - _REPLACEMAPPINGREQUEST._serialized_start=1201 - _REPLACEMAPPINGREQUEST._serialized_end=1324 - _PAGEREQUEST._serialized_start=1326 - _PAGEREQUEST._serialized_end=1401 - _ENTRYRESULT._serialized_start=1403 - _ENTRYRESULT._serialized_end=1460 - _ENTRY._serialized_start=1462 - _ENTRY._serialized_end=1497 - _TRUNCATEREQUEST._serialized_start=1499 - _TRUNCATEREQUEST._serialized_end=1546 - _ADDINDEXREQUEST._serialized_start=1548 - _ADDINDEXREQUEST._serialized_end=1666 - _REMOVEINDEXREQUEST._serialized_start=1668 - _REMOVEINDEXREQUEST._serialized_end=1753 - _AGGREGATEREQUEST._serialized_start=1755 - _AGGREGATEREQUEST._serialized_end=1869 - _INVOKEREQUEST._serialized_start=1871 - _INVOKEREQUEST._serialized_end=1964 - _INVOKEALLREQUEST._serialized_start=1966 - _INVOKEALLREQUEST._serialized_end=2079 - _ENTRYSETREQUEST._serialized_start=2081 - _ENTRYSETREQUEST._serialized_end=2180 - _KEYSETREQUEST._serialized_start=2182 - _KEYSETREQUEST._serialized_end=2259 - _VALUESREQUEST._serialized_start=2261 - _VALUESREQUEST._serialized_end=2358 - _OPTIONALVALUE._serialized_start=2360 - _OPTIONALVALUE._serialized_end=2407 - _MAPLISTENERREQUEST._serialized_start=2410 - _MAPLISTENERREQUEST._serialized_end=2706 - _MAPLISTENERREQUEST_REQUESTTYPE._serialized_start=2662 - _MAPLISTENERREQUEST_REQUESTTYPE._serialized_end=2706 - _MAPLISTENERRESPONSE._serialized_start=2709 - _MAPLISTENERRESPONSE._serialized_end=3091 - _MAPLISTENERSUBSCRIBEDRESPONSE._serialized_start=3093 - _MAPLISTENERSUBSCRIBEDRESPONSE._serialized_end=3137 - _MAPLISTENERUNSUBSCRIBEDRESPONSE._serialized_start=3139 - _MAPLISTENERUNSUBSCRIBEDRESPONSE._serialized_end=3185 - _CACHEDESTROYEDRESPONSE._serialized_start=3187 - _CACHEDESTROYEDRESPONSE._serialized_end=3226 - _CACHETRUNCATEDRESPONSE._serialized_start=3228 - _CACHETRUNCATEDRESPONSE._serialized_end=3267 - _MAPLISTENERERRORRESPONSE._serialized_start=3269 - _MAPLISTENERERRORRESPONSE._serialized_end=3354 - _MAPEVENTRESPONSE._serialized_start=3357 - _MAPEVENTRESPONSE._serialized_end=3651 - _MAPEVENTRESPONSE_TRANSFORMATIONSTATE._serialized_start=3571 - _MAPEVENTRESPONSE_TRANSFORMATIONSTATE._serialized_end=3651 + _ISREADYREQUEST._serialized_start=435 + _ISREADYREQUEST._serialized_end=481 + _SIZEREQUEST._serialized_start=483 + _SIZEREQUEST._serialized_end=526 + _GETREQUEST._serialized_start=528 + _GETREQUEST._serialized_end=599 + _GETALLREQUEST._serialized_start=601 + _GETALLREQUEST._serialized_end=675 + _PUTREQUEST._serialized_start=677 + _PUTREQUEST._serialized_end=776 + _PUTALLREQUEST._serialized_start=778 + _PUTALLREQUEST._serialized_end=885 + _PUTIFABSENTREQUEST._serialized_start=887 + _PUTIFABSENTREQUEST._serialized_end=994 + _REMOVEREQUEST._serialized_start=996 + _REMOVEREQUEST._serialized_end=1070 + _REMOVEMAPPINGREQUEST._serialized_start=1072 + _REMOVEMAPPINGREQUEST._serialized_end=1168 + _REPLACEREQUEST._serialized_start=1170 + _REPLACEREQUEST._serialized_end=1260 + _REPLACEMAPPINGREQUEST._serialized_start=1262 + _REPLACEMAPPINGREQUEST._serialized_end=1385 + _PAGEREQUEST._serialized_start=1387 + _PAGEREQUEST._serialized_end=1462 + _ENTRYRESULT._serialized_start=1464 + _ENTRYRESULT._serialized_end=1521 + _ENTRY._serialized_start=1523 + _ENTRY._serialized_end=1558 + _TRUNCATEREQUEST._serialized_start=1560 + _TRUNCATEREQUEST._serialized_end=1607 + _ADDINDEXREQUEST._serialized_start=1609 + _ADDINDEXREQUEST._serialized_end=1727 + _REMOVEINDEXREQUEST._serialized_start=1729 + _REMOVEINDEXREQUEST._serialized_end=1814 + _AGGREGATEREQUEST._serialized_start=1816 + _AGGREGATEREQUEST._serialized_end=1930 + _INVOKEREQUEST._serialized_start=1932 + _INVOKEREQUEST._serialized_end=2025 + _INVOKEALLREQUEST._serialized_start=2027 + _INVOKEALLREQUEST._serialized_end=2140 + _ENTRYSETREQUEST._serialized_start=2142 + _ENTRYSETREQUEST._serialized_end=2241 + _KEYSETREQUEST._serialized_start=2243 + _KEYSETREQUEST._serialized_end=2320 + _VALUESREQUEST._serialized_start=2322 + _VALUESREQUEST._serialized_end=2419 + _OPTIONALVALUE._serialized_start=2421 + _OPTIONALVALUE._serialized_end=2468 + _MAPLISTENERREQUEST._serialized_start=2471 + _MAPLISTENERREQUEST._serialized_end=2767 + _MAPLISTENERREQUEST_REQUESTTYPE._serialized_start=2723 + _MAPLISTENERREQUEST_REQUESTTYPE._serialized_end=2767 + _MAPLISTENERRESPONSE._serialized_start=2770 + _MAPLISTENERRESPONSE._serialized_end=3152 + _MAPLISTENERSUBSCRIBEDRESPONSE._serialized_start=3154 + _MAPLISTENERSUBSCRIBEDRESPONSE._serialized_end=3198 + _MAPLISTENERUNSUBSCRIBEDRESPONSE._serialized_start=3200 + _MAPLISTENERUNSUBSCRIBEDRESPONSE._serialized_end=3246 + _CACHEDESTROYEDRESPONSE._serialized_start=3248 + _CACHEDESTROYEDRESPONSE._serialized_end=3287 + _CACHETRUNCATEDRESPONSE._serialized_start=3289 + _CACHETRUNCATEDRESPONSE._serialized_end=3328 + _MAPLISTENERERRORRESPONSE._serialized_start=3330 + _MAPLISTENERERRORRESPONSE._serialized_end=3415 + _MAPEVENTRESPONSE._serialized_start=3418 + _MAPEVENTRESPONSE._serialized_end=3712 + _MAPEVENTRESPONSE_TRANSFORMATIONSTATE._serialized_start=3632 + _MAPEVENTRESPONSE_TRANSFORMATIONSTATE._serialized_end=3712 # @@protoc_insertion_point(module_scope) diff --git a/src/coherence/messages_pb2.pyi b/src/coherence/messages_pb2.pyi new file mode 100644 index 0000000..67ef945 --- /dev/null +++ b/src/coherence/messages_pb2.pyi @@ -0,0 +1,482 @@ +# mypy: ignore-errors +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class AddIndexRequest(_message.Message): + __slots__ = ["cache", "comparator", "extractor", "format", "scope", "sorted"] + CACHE_FIELD_NUMBER: _ClassVar[int] + COMPARATOR_FIELD_NUMBER: _ClassVar[int] + EXTRACTOR_FIELD_NUMBER: _ClassVar[int] + FORMAT_FIELD_NUMBER: _ClassVar[int] + SCOPE_FIELD_NUMBER: _ClassVar[int] + SORTED_FIELD_NUMBER: _ClassVar[int] + cache: str + comparator: bytes + extractor: bytes + format: str + scope: str + sorted: bool + def __init__(self, scope: _Optional[str] = ..., cache: _Optional[str] = ..., format: _Optional[str] = ..., extractor: _Optional[bytes] = ..., sorted: bool = ..., comparator: _Optional[bytes] = ...) -> None: ... + +class AggregateRequest(_message.Message): + __slots__ = ["aggregator", "cache", "filter", "format", "keys", "scope"] + AGGREGATOR_FIELD_NUMBER: _ClassVar[int] + CACHE_FIELD_NUMBER: _ClassVar[int] + FILTER_FIELD_NUMBER: _ClassVar[int] + FORMAT_FIELD_NUMBER: _ClassVar[int] + KEYS_FIELD_NUMBER: _ClassVar[int] + SCOPE_FIELD_NUMBER: _ClassVar[int] + aggregator: bytes + cache: str + filter: bytes + format: str + keys: _containers.RepeatedScalarFieldContainer[bytes] + scope: str + def __init__(self, scope: _Optional[str] = ..., cache: _Optional[str] = ..., format: _Optional[str] = ..., aggregator: _Optional[bytes] = ..., keys: _Optional[_Iterable[bytes]] = ..., filter: _Optional[bytes] = ...) -> None: ... + +class CacheDestroyedResponse(_message.Message): + __slots__ = ["cache"] + CACHE_FIELD_NUMBER: _ClassVar[int] + cache: str + def __init__(self, cache: _Optional[str] = ...) -> None: ... + +class CacheTruncatedResponse(_message.Message): + __slots__ = ["cache"] + CACHE_FIELD_NUMBER: _ClassVar[int] + cache: str + def __init__(self, cache: _Optional[str] = ...) -> None: ... + +class ClearRequest(_message.Message): + __slots__ = ["cache", "scope"] + CACHE_FIELD_NUMBER: _ClassVar[int] + SCOPE_FIELD_NUMBER: _ClassVar[int] + cache: str + scope: str + def __init__(self, scope: _Optional[str] = ..., cache: _Optional[str] = ...) -> None: ... + +class ContainsEntryRequest(_message.Message): + __slots__ = ["cache", "format", "key", "scope", "value"] + CACHE_FIELD_NUMBER: _ClassVar[int] + FORMAT_FIELD_NUMBER: _ClassVar[int] + KEY_FIELD_NUMBER: _ClassVar[int] + SCOPE_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + cache: str + format: str + key: bytes + scope: str + value: bytes + def __init__(self, scope: _Optional[str] = ..., cache: _Optional[str] = ..., format: _Optional[str] = ..., key: _Optional[bytes] = ..., value: _Optional[bytes] = ...) -> None: ... + +class ContainsKeyRequest(_message.Message): + __slots__ = ["cache", "format", "key", "scope"] + CACHE_FIELD_NUMBER: _ClassVar[int] + FORMAT_FIELD_NUMBER: _ClassVar[int] + KEY_FIELD_NUMBER: _ClassVar[int] + SCOPE_FIELD_NUMBER: _ClassVar[int] + cache: str + format: str + key: bytes + scope: str + def __init__(self, scope: _Optional[str] = ..., cache: _Optional[str] = ..., format: _Optional[str] = ..., key: _Optional[bytes] = ...) -> None: ... + +class ContainsValueRequest(_message.Message): + __slots__ = ["cache", "format", "scope", "value"] + CACHE_FIELD_NUMBER: _ClassVar[int] + FORMAT_FIELD_NUMBER: _ClassVar[int] + SCOPE_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + cache: str + format: str + scope: str + value: bytes + def __init__(self, scope: _Optional[str] = ..., cache: _Optional[str] = ..., format: _Optional[str] = ..., value: _Optional[bytes] = ...) -> None: ... + +class DestroyRequest(_message.Message): + __slots__ = ["cache", "scope"] + CACHE_FIELD_NUMBER: _ClassVar[int] + SCOPE_FIELD_NUMBER: _ClassVar[int] + cache: str + scope: str + def __init__(self, scope: _Optional[str] = ..., cache: _Optional[str] = ...) -> None: ... + +class Entry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: bytes + value: bytes + def __init__(self, key: _Optional[bytes] = ..., value: _Optional[bytes] = ...) -> None: ... + +class EntryResult(_message.Message): + __slots__ = ["cookie", "key", "value"] + COOKIE_FIELD_NUMBER: _ClassVar[int] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + cookie: bytes + key: bytes + value: bytes + def __init__(self, key: _Optional[bytes] = ..., value: _Optional[bytes] = ..., cookie: _Optional[bytes] = ...) -> None: ... + +class EntrySetRequest(_message.Message): + __slots__ = ["cache", "comparator", "filter", "format", "scope"] + CACHE_FIELD_NUMBER: _ClassVar[int] + COMPARATOR_FIELD_NUMBER: _ClassVar[int] + FILTER_FIELD_NUMBER: _ClassVar[int] + FORMAT_FIELD_NUMBER: _ClassVar[int] + SCOPE_FIELD_NUMBER: _ClassVar[int] + cache: str + comparator: bytes + filter: bytes + format: str + scope: str + def __init__(self, scope: _Optional[str] = ..., cache: _Optional[str] = ..., format: _Optional[str] = ..., filter: _Optional[bytes] = ..., comparator: _Optional[bytes] = ...) -> None: ... + +class GetAllRequest(_message.Message): + __slots__ = ["cache", "format", "key", "scope"] + CACHE_FIELD_NUMBER: _ClassVar[int] + FORMAT_FIELD_NUMBER: _ClassVar[int] + KEY_FIELD_NUMBER: _ClassVar[int] + SCOPE_FIELD_NUMBER: _ClassVar[int] + cache: str + format: str + key: _containers.RepeatedScalarFieldContainer[bytes] + scope: str + def __init__(self, scope: _Optional[str] = ..., cache: _Optional[str] = ..., format: _Optional[str] = ..., key: _Optional[_Iterable[bytes]] = ...) -> None: ... + +class GetRequest(_message.Message): + __slots__ = ["cache", "format", "key", "scope"] + CACHE_FIELD_NUMBER: _ClassVar[int] + FORMAT_FIELD_NUMBER: _ClassVar[int] + KEY_FIELD_NUMBER: _ClassVar[int] + SCOPE_FIELD_NUMBER: _ClassVar[int] + cache: str + format: str + key: bytes + scope: str + def __init__(self, scope: _Optional[str] = ..., cache: _Optional[str] = ..., format: _Optional[str] = ..., key: _Optional[bytes] = ...) -> None: ... + +class InvokeAllRequest(_message.Message): + __slots__ = ["cache", "filter", "format", "keys", "processor", "scope"] + CACHE_FIELD_NUMBER: _ClassVar[int] + FILTER_FIELD_NUMBER: _ClassVar[int] + FORMAT_FIELD_NUMBER: _ClassVar[int] + KEYS_FIELD_NUMBER: _ClassVar[int] + PROCESSOR_FIELD_NUMBER: _ClassVar[int] + SCOPE_FIELD_NUMBER: _ClassVar[int] + cache: str + filter: bytes + format: str + keys: _containers.RepeatedScalarFieldContainer[bytes] + processor: bytes + scope: str + def __init__(self, scope: _Optional[str] = ..., cache: _Optional[str] = ..., format: _Optional[str] = ..., processor: _Optional[bytes] = ..., keys: _Optional[_Iterable[bytes]] = ..., filter: _Optional[bytes] = ...) -> None: ... + +class InvokeRequest(_message.Message): + __slots__ = ["cache", "format", "key", "processor", "scope"] + CACHE_FIELD_NUMBER: _ClassVar[int] + FORMAT_FIELD_NUMBER: _ClassVar[int] + KEY_FIELD_NUMBER: _ClassVar[int] + PROCESSOR_FIELD_NUMBER: _ClassVar[int] + SCOPE_FIELD_NUMBER: _ClassVar[int] + cache: str + format: str + key: bytes + processor: bytes + scope: str + def __init__(self, scope: _Optional[str] = ..., cache: _Optional[str] = ..., format: _Optional[str] = ..., processor: _Optional[bytes] = ..., key: _Optional[bytes] = ...) -> None: ... + +class IsEmptyRequest(_message.Message): + __slots__ = ["cache", "scope"] + CACHE_FIELD_NUMBER: _ClassVar[int] + SCOPE_FIELD_NUMBER: _ClassVar[int] + cache: str + scope: str + def __init__(self, scope: _Optional[str] = ..., cache: _Optional[str] = ...) -> None: ... + +class IsReadyRequest(_message.Message): + __slots__ = ["cache", "scope"] + CACHE_FIELD_NUMBER: _ClassVar[int] + SCOPE_FIELD_NUMBER: _ClassVar[int] + cache: str + scope: str + def __init__(self, scope: _Optional[str] = ..., cache: _Optional[str] = ...) -> None: ... + +class KeySetRequest(_message.Message): + __slots__ = ["cache", "filter", "format", "scope"] + CACHE_FIELD_NUMBER: _ClassVar[int] + FILTER_FIELD_NUMBER: _ClassVar[int] + FORMAT_FIELD_NUMBER: _ClassVar[int] + SCOPE_FIELD_NUMBER: _ClassVar[int] + cache: str + filter: bytes + format: str + scope: str + def __init__(self, scope: _Optional[str] = ..., cache: _Optional[str] = ..., format: _Optional[str] = ..., filter: _Optional[bytes] = ...) -> None: ... + +class MapEventResponse(_message.Message): + __slots__ = ["filterIds", "id", "key", "newValue", "oldValue", "priming", "synthetic", "transformationState"] + class TransformationState(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + FILTERIDS_FIELD_NUMBER: _ClassVar[int] + ID_FIELD_NUMBER: _ClassVar[int] + KEY_FIELD_NUMBER: _ClassVar[int] + NEWVALUE_FIELD_NUMBER: _ClassVar[int] + NON_TRANSFORMABLE: MapEventResponse.TransformationState + OLDVALUE_FIELD_NUMBER: _ClassVar[int] + PRIMING_FIELD_NUMBER: _ClassVar[int] + SYNTHETIC_FIELD_NUMBER: _ClassVar[int] + TRANSFORMABLE: MapEventResponse.TransformationState + TRANSFORMATIONSTATE_FIELD_NUMBER: _ClassVar[int] + TRANSFORMED: MapEventResponse.TransformationState + filterIds: _containers.RepeatedScalarFieldContainer[int] + id: int + key: bytes + newValue: bytes + oldValue: bytes + priming: bool + synthetic: bool + transformationState: MapEventResponse.TransformationState + def __init__(self, id: _Optional[int] = ..., key: _Optional[bytes] = ..., newValue: _Optional[bytes] = ..., oldValue: _Optional[bytes] = ..., transformationState: _Optional[_Union[MapEventResponse.TransformationState, str]] = ..., filterIds: _Optional[_Iterable[int]] = ..., synthetic: bool = ..., priming: bool = ...) -> None: ... + +class MapListenerErrorResponse(_message.Message): + __slots__ = ["code", "message", "stack", "uid"] + CODE_FIELD_NUMBER: _ClassVar[int] + MESSAGE_FIELD_NUMBER: _ClassVar[int] + STACK_FIELD_NUMBER: _ClassVar[int] + UID_FIELD_NUMBER: _ClassVar[int] + code: int + message: str + stack: _containers.RepeatedScalarFieldContainer[str] + uid: str + def __init__(self, uid: _Optional[str] = ..., message: _Optional[str] = ..., code: _Optional[int] = ..., stack: _Optional[_Iterable[str]] = ...) -> None: ... + +class MapListenerRequest(_message.Message): + __slots__ = ["cache", "filter", "filterId", "format", "key", "lite", "priming", "scope", "subscribe", "trigger", "type", "uid"] + class RequestType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + CACHE_FIELD_NUMBER: _ClassVar[int] + FILTER: MapListenerRequest.RequestType + FILTERID_FIELD_NUMBER: _ClassVar[int] + FILTER_FIELD_NUMBER: _ClassVar[int] + FORMAT_FIELD_NUMBER: _ClassVar[int] + INIT: MapListenerRequest.RequestType + KEY: MapListenerRequest.RequestType + KEY_FIELD_NUMBER: _ClassVar[int] + LITE_FIELD_NUMBER: _ClassVar[int] + PRIMING_FIELD_NUMBER: _ClassVar[int] + SCOPE_FIELD_NUMBER: _ClassVar[int] + SUBSCRIBE_FIELD_NUMBER: _ClassVar[int] + TRIGGER_FIELD_NUMBER: _ClassVar[int] + TYPE_FIELD_NUMBER: _ClassVar[int] + UID_FIELD_NUMBER: _ClassVar[int] + cache: str + filter: bytes + filterId: int + format: str + key: bytes + lite: bool + priming: bool + scope: str + subscribe: bool + trigger: bytes + type: MapListenerRequest.RequestType + uid: str + def __init__(self, scope: _Optional[str] = ..., cache: _Optional[str] = ..., format: _Optional[str] = ..., uid: _Optional[str] = ..., type: _Optional[_Union[MapListenerRequest.RequestType, str]] = ..., filter: _Optional[bytes] = ..., key: _Optional[bytes] = ..., lite: bool = ..., subscribe: bool = ..., priming: bool = ..., trigger: _Optional[bytes] = ..., filterId: _Optional[int] = ...) -> None: ... + +class MapListenerResponse(_message.Message): + __slots__ = ["destroyed", "error", "event", "subscribed", "truncated", "unsubscribed"] + DESTROYED_FIELD_NUMBER: _ClassVar[int] + ERROR_FIELD_NUMBER: _ClassVar[int] + EVENT_FIELD_NUMBER: _ClassVar[int] + SUBSCRIBED_FIELD_NUMBER: _ClassVar[int] + TRUNCATED_FIELD_NUMBER: _ClassVar[int] + UNSUBSCRIBED_FIELD_NUMBER: _ClassVar[int] + destroyed: CacheDestroyedResponse + error: MapListenerErrorResponse + event: MapEventResponse + subscribed: MapListenerSubscribedResponse + truncated: CacheTruncatedResponse + unsubscribed: MapListenerUnsubscribedResponse + def __init__(self, subscribed: _Optional[_Union[MapListenerSubscribedResponse, _Mapping]] = ..., unsubscribed: _Optional[_Union[MapListenerUnsubscribedResponse, _Mapping]] = ..., event: _Optional[_Union[MapEventResponse, _Mapping]] = ..., error: _Optional[_Union[MapListenerErrorResponse, _Mapping]] = ..., destroyed: _Optional[_Union[CacheDestroyedResponse, _Mapping]] = ..., truncated: _Optional[_Union[CacheTruncatedResponse, _Mapping]] = ...) -> None: ... + +class MapListenerSubscribedResponse(_message.Message): + __slots__ = ["uid"] + UID_FIELD_NUMBER: _ClassVar[int] + uid: str + def __init__(self, uid: _Optional[str] = ...) -> None: ... + +class MapListenerUnsubscribedResponse(_message.Message): + __slots__ = ["uid"] + UID_FIELD_NUMBER: _ClassVar[int] + uid: str + def __init__(self, uid: _Optional[str] = ...) -> None: ... + +class OptionalValue(_message.Message): + __slots__ = ["present", "value"] + PRESENT_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + present: bool + value: bytes + def __init__(self, present: bool = ..., value: _Optional[bytes] = ...) -> None: ... + +class PageRequest(_message.Message): + __slots__ = ["cache", "cookie", "format", "scope"] + CACHE_FIELD_NUMBER: _ClassVar[int] + COOKIE_FIELD_NUMBER: _ClassVar[int] + FORMAT_FIELD_NUMBER: _ClassVar[int] + SCOPE_FIELD_NUMBER: _ClassVar[int] + cache: str + cookie: bytes + format: str + scope: str + def __init__(self, scope: _Optional[str] = ..., cache: _Optional[str] = ..., format: _Optional[str] = ..., cookie: _Optional[bytes] = ...) -> None: ... + +class PutAllRequest(_message.Message): + __slots__ = ["cache", "entry", "format", "scope", "ttl"] + CACHE_FIELD_NUMBER: _ClassVar[int] + ENTRY_FIELD_NUMBER: _ClassVar[int] + FORMAT_FIELD_NUMBER: _ClassVar[int] + SCOPE_FIELD_NUMBER: _ClassVar[int] + TTL_FIELD_NUMBER: _ClassVar[int] + cache: str + entry: _containers.RepeatedCompositeFieldContainer[Entry] + format: str + scope: str + ttl: int + def __init__(self, scope: _Optional[str] = ..., cache: _Optional[str] = ..., format: _Optional[str] = ..., entry: _Optional[_Iterable[_Union[Entry, _Mapping]]] = ..., ttl: _Optional[int] = ...) -> None: ... + +class PutIfAbsentRequest(_message.Message): + __slots__ = ["cache", "format", "key", "scope", "ttl", "value"] + CACHE_FIELD_NUMBER: _ClassVar[int] + FORMAT_FIELD_NUMBER: _ClassVar[int] + KEY_FIELD_NUMBER: _ClassVar[int] + SCOPE_FIELD_NUMBER: _ClassVar[int] + TTL_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + cache: str + format: str + key: bytes + scope: str + ttl: int + value: bytes + def __init__(self, scope: _Optional[str] = ..., cache: _Optional[str] = ..., format: _Optional[str] = ..., key: _Optional[bytes] = ..., value: _Optional[bytes] = ..., ttl: _Optional[int] = ...) -> None: ... + +class PutRequest(_message.Message): + __slots__ = ["cache", "format", "key", "scope", "ttl", "value"] + CACHE_FIELD_NUMBER: _ClassVar[int] + FORMAT_FIELD_NUMBER: _ClassVar[int] + KEY_FIELD_NUMBER: _ClassVar[int] + SCOPE_FIELD_NUMBER: _ClassVar[int] + TTL_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + cache: str + format: str + key: bytes + scope: str + ttl: int + value: bytes + def __init__(self, scope: _Optional[str] = ..., cache: _Optional[str] = ..., format: _Optional[str] = ..., key: _Optional[bytes] = ..., value: _Optional[bytes] = ..., ttl: _Optional[int] = ...) -> None: ... + +class RemoveIndexRequest(_message.Message): + __slots__ = ["cache", "extractor", "format", "scope"] + CACHE_FIELD_NUMBER: _ClassVar[int] + EXTRACTOR_FIELD_NUMBER: _ClassVar[int] + FORMAT_FIELD_NUMBER: _ClassVar[int] + SCOPE_FIELD_NUMBER: _ClassVar[int] + cache: str + extractor: bytes + format: str + scope: str + def __init__(self, scope: _Optional[str] = ..., cache: _Optional[str] = ..., format: _Optional[str] = ..., extractor: _Optional[bytes] = ...) -> None: ... + +class RemoveMappingRequest(_message.Message): + __slots__ = ["cache", "format", "key", "scope", "value"] + CACHE_FIELD_NUMBER: _ClassVar[int] + FORMAT_FIELD_NUMBER: _ClassVar[int] + KEY_FIELD_NUMBER: _ClassVar[int] + SCOPE_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + cache: str + format: str + key: bytes + scope: str + value: bytes + def __init__(self, scope: _Optional[str] = ..., cache: _Optional[str] = ..., format: _Optional[str] = ..., key: _Optional[bytes] = ..., value: _Optional[bytes] = ...) -> None: ... + +class RemoveRequest(_message.Message): + __slots__ = ["cache", "format", "key", "scope"] + CACHE_FIELD_NUMBER: _ClassVar[int] + FORMAT_FIELD_NUMBER: _ClassVar[int] + KEY_FIELD_NUMBER: _ClassVar[int] + SCOPE_FIELD_NUMBER: _ClassVar[int] + cache: str + format: str + key: bytes + scope: str + def __init__(self, scope: _Optional[str] = ..., cache: _Optional[str] = ..., format: _Optional[str] = ..., key: _Optional[bytes] = ...) -> None: ... + +class ReplaceMappingRequest(_message.Message): + __slots__ = ["cache", "format", "key", "newValue", "previousValue", "scope"] + CACHE_FIELD_NUMBER: _ClassVar[int] + FORMAT_FIELD_NUMBER: _ClassVar[int] + KEY_FIELD_NUMBER: _ClassVar[int] + NEWVALUE_FIELD_NUMBER: _ClassVar[int] + PREVIOUSVALUE_FIELD_NUMBER: _ClassVar[int] + SCOPE_FIELD_NUMBER: _ClassVar[int] + cache: str + format: str + key: bytes + newValue: bytes + previousValue: bytes + scope: str + def __init__(self, scope: _Optional[str] = ..., cache: _Optional[str] = ..., format: _Optional[str] = ..., key: _Optional[bytes] = ..., previousValue: _Optional[bytes] = ..., newValue: _Optional[bytes] = ...) -> None: ... + +class ReplaceRequest(_message.Message): + __slots__ = ["cache", "format", "key", "scope", "value"] + CACHE_FIELD_NUMBER: _ClassVar[int] + FORMAT_FIELD_NUMBER: _ClassVar[int] + KEY_FIELD_NUMBER: _ClassVar[int] + SCOPE_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + cache: str + format: str + key: bytes + scope: str + value: bytes + def __init__(self, scope: _Optional[str] = ..., cache: _Optional[str] = ..., format: _Optional[str] = ..., key: _Optional[bytes] = ..., value: _Optional[bytes] = ...) -> None: ... + +class SizeRequest(_message.Message): + __slots__ = ["cache", "scope"] + CACHE_FIELD_NUMBER: _ClassVar[int] + SCOPE_FIELD_NUMBER: _ClassVar[int] + cache: str + scope: str + def __init__(self, scope: _Optional[str] = ..., cache: _Optional[str] = ...) -> None: ... + +class TruncateRequest(_message.Message): + __slots__ = ["cache", "scope"] + CACHE_FIELD_NUMBER: _ClassVar[int] + SCOPE_FIELD_NUMBER: _ClassVar[int] + cache: str + scope: str + def __init__(self, scope: _Optional[str] = ..., cache: _Optional[str] = ...) -> None: ... + +class ValuesRequest(_message.Message): + __slots__ = ["cache", "comparator", "filter", "format", "scope"] + CACHE_FIELD_NUMBER: _ClassVar[int] + COMPARATOR_FIELD_NUMBER: _ClassVar[int] + FILTER_FIELD_NUMBER: _ClassVar[int] + FORMAT_FIELD_NUMBER: _ClassVar[int] + SCOPE_FIELD_NUMBER: _ClassVar[int] + cache: str + comparator: bytes + filter: bytes + format: str + scope: str + def __init__(self, scope: _Optional[str] = ..., cache: _Optional[str] = ..., format: _Optional[str] = ..., filter: _Optional[bytes] = ..., comparator: _Optional[bytes] = ...) -> None: ... diff --git a/src/coherence/services_pb2.py b/src/coherence/services_pb2.py index 7774ea3..810ec21 100644 --- a/src/coherence/services_pb2.py +++ b/src/coherence/services_pb2.py @@ -16,7 +16,7 @@ from google.protobuf import wrappers_pb2 as google_dot_protobuf_dot_wrappers__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0eservices.proto\x12\tcoherence\x1a\x0emessages.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1egoogle/protobuf/wrappers.proto2\xa6\x0f\n\x11NamedCacheService\x12@\n\x08\x61\x64\x64Index\x12\x1a.coherence.AddIndexRequest\x1a\x16.google.protobuf.Empty\"\x00\x12G\n\taggregate\x12\x1b.coherence.AggregateRequest\x1a\x1b.google.protobuf.BytesValue\"\x00\x12:\n\x05\x63lear\x12\x17.coherence.ClearRequest\x1a\x16.google.protobuf.Empty\"\x00\x12N\n\rcontainsEntry\x12\x1f.coherence.ContainsEntryRequest\x1a\x1a.google.protobuf.BoolValue\"\x00\x12J\n\x0b\x63ontainsKey\x12\x1d.coherence.ContainsKeyRequest\x1a\x1a.google.protobuf.BoolValue\"\x00\x12N\n\rcontainsValue\x12\x1f.coherence.ContainsValueRequest\x1a\x1a.google.protobuf.BoolValue\"\x00\x12>\n\x07\x64\x65stroy\x12\x19.coherence.DestroyRequest\x1a\x16.google.protobuf.Empty\"\x00\x12<\n\x08\x65ntrySet\x12\x1a.coherence.EntrySetRequest\x1a\x10.coherence.Entry\"\x00\x30\x01\x12M\n\x06\x65vents\x12\x1d.coherence.MapListenerRequest\x1a\x1e.coherence.MapListenerResponse\"\x00(\x01\x30\x01\x12\x38\n\x03get\x12\x15.coherence.GetRequest\x1a\x18.coherence.OptionalValue\"\x00\x12\x38\n\x06getAll\x12\x18.coherence.GetAllRequest\x1a\x10.coherence.Entry\"\x00\x30\x01\x12\x41\n\x06invoke\x12\x18.coherence.InvokeRequest\x1a\x1b.google.protobuf.BytesValue\"\x00\x12>\n\tinvokeAll\x12\x1b.coherence.InvokeAllRequest\x1a\x10.coherence.Entry\"\x00\x30\x01\x12\x42\n\x07isEmpty\x12\x19.coherence.IsEmptyRequest\x1a\x1a.google.protobuf.BoolValue\"\x00\x12\x43\n\x06keySet\x12\x18.coherence.KeySetRequest\x1a\x1b.google.protobuf.BytesValue\"\x00\x30\x01\x12\x46\n\x10nextEntrySetPage\x12\x16.coherence.PageRequest\x1a\x16.coherence.EntryResult\"\x00\x30\x01\x12I\n\x0enextKeySetPage\x12\x16.coherence.PageRequest\x1a\x1b.google.protobuf.BytesValue\"\x00\x30\x01\x12;\n\x03put\x12\x15.coherence.PutRequest\x1a\x1b.google.protobuf.BytesValue\"\x00\x12<\n\x06putAll\x12\x18.coherence.PutAllRequest\x1a\x16.google.protobuf.Empty\"\x00\x12K\n\x0bputIfAbsent\x12\x1d.coherence.PutIfAbsentRequest\x1a\x1b.google.protobuf.BytesValue\"\x00\x12\x41\n\x06remove\x12\x18.coherence.RemoveRequest\x1a\x1b.google.protobuf.BytesValue\"\x00\x12\x46\n\x0bremoveIndex\x12\x1d.coherence.RemoveIndexRequest\x1a\x16.google.protobuf.Empty\"\x00\x12N\n\rremoveMapping\x12\x1f.coherence.RemoveMappingRequest\x1a\x1a.google.protobuf.BoolValue\"\x00\x12\x43\n\x07replace\x12\x19.coherence.ReplaceRequest\x1a\x1b.google.protobuf.BytesValue\"\x00\x12P\n\x0ereplaceMapping\x12 .coherence.ReplaceMappingRequest\x1a\x1a.google.protobuf.BoolValue\"\x00\x12=\n\x04size\x12\x16.coherence.SizeRequest\x1a\x1b.google.protobuf.Int32Value\"\x00\x12@\n\x08truncate\x12\x1a.coherence.TruncateRequest\x1a\x16.google.protobuf.Empty\"\x00\x12\x43\n\x06values\x12\x18.coherence.ValuesRequest\x1a\x1b.google.protobuf.BytesValue\"\x00\x30\x01\x42\x1d\n\x19\x63om.oracle.coherence.grpcP\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0eservices.proto\x12\tcoherence\x1a\x0emessages.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1egoogle/protobuf/wrappers.proto2\xea\x0f\n\x11NamedCacheService\x12@\n\x08\x61\x64\x64Index\x12\x1a.coherence.AddIndexRequest\x1a\x16.google.protobuf.Empty\"\x00\x12G\n\taggregate\x12\x1b.coherence.AggregateRequest\x1a\x1b.google.protobuf.BytesValue\"\x00\x12:\n\x05\x63lear\x12\x17.coherence.ClearRequest\x1a\x16.google.protobuf.Empty\"\x00\x12N\n\rcontainsEntry\x12\x1f.coherence.ContainsEntryRequest\x1a\x1a.google.protobuf.BoolValue\"\x00\x12J\n\x0b\x63ontainsKey\x12\x1d.coherence.ContainsKeyRequest\x1a\x1a.google.protobuf.BoolValue\"\x00\x12N\n\rcontainsValue\x12\x1f.coherence.ContainsValueRequest\x1a\x1a.google.protobuf.BoolValue\"\x00\x12>\n\x07\x64\x65stroy\x12\x19.coherence.DestroyRequest\x1a\x16.google.protobuf.Empty\"\x00\x12<\n\x08\x65ntrySet\x12\x1a.coherence.EntrySetRequest\x1a\x10.coherence.Entry\"\x00\x30\x01\x12M\n\x06\x65vents\x12\x1d.coherence.MapListenerRequest\x1a\x1e.coherence.MapListenerResponse\"\x00(\x01\x30\x01\x12\x38\n\x03get\x12\x15.coherence.GetRequest\x1a\x18.coherence.OptionalValue\"\x00\x12\x38\n\x06getAll\x12\x18.coherence.GetAllRequest\x1a\x10.coherence.Entry\"\x00\x30\x01\x12\x41\n\x06invoke\x12\x18.coherence.InvokeRequest\x1a\x1b.google.protobuf.BytesValue\"\x00\x12>\n\tinvokeAll\x12\x1b.coherence.InvokeAllRequest\x1a\x10.coherence.Entry\"\x00\x30\x01\x12\x42\n\x07isEmpty\x12\x19.coherence.IsEmptyRequest\x1a\x1a.google.protobuf.BoolValue\"\x00\x12\x42\n\x07isReady\x12\x19.coherence.IsReadyRequest\x1a\x1a.google.protobuf.BoolValue\"\x00\x12\x43\n\x06keySet\x12\x18.coherence.KeySetRequest\x1a\x1b.google.protobuf.BytesValue\"\x00\x30\x01\x12\x46\n\x10nextEntrySetPage\x12\x16.coherence.PageRequest\x1a\x16.coherence.EntryResult\"\x00\x30\x01\x12I\n\x0enextKeySetPage\x12\x16.coherence.PageRequest\x1a\x1b.google.protobuf.BytesValue\"\x00\x30\x01\x12;\n\x03put\x12\x15.coherence.PutRequest\x1a\x1b.google.protobuf.BytesValue\"\x00\x12<\n\x06putAll\x12\x18.coherence.PutAllRequest\x1a\x16.google.protobuf.Empty\"\x00\x12K\n\x0bputIfAbsent\x12\x1d.coherence.PutIfAbsentRequest\x1a\x1b.google.protobuf.BytesValue\"\x00\x12\x41\n\x06remove\x12\x18.coherence.RemoveRequest\x1a\x1b.google.protobuf.BytesValue\"\x00\x12\x46\n\x0bremoveIndex\x12\x1d.coherence.RemoveIndexRequest\x1a\x16.google.protobuf.Empty\"\x00\x12N\n\rremoveMapping\x12\x1f.coherence.RemoveMappingRequest\x1a\x1a.google.protobuf.BoolValue\"\x00\x12\x43\n\x07replace\x12\x19.coherence.ReplaceRequest\x1a\x1b.google.protobuf.BytesValue\"\x00\x12P\n\x0ereplaceMapping\x12 .coherence.ReplaceMappingRequest\x1a\x1a.google.protobuf.BoolValue\"\x00\x12=\n\x04size\x12\x16.coherence.SizeRequest\x1a\x1b.google.protobuf.Int32Value\"\x00\x12@\n\x08truncate\x12\x1a.coherence.TruncateRequest\x1a\x16.google.protobuf.Empty\"\x00\x12\x43\n\x06values\x12\x18.coherence.ValuesRequest\x1a\x1b.google.protobuf.BytesValue\"\x00\x30\x01\x42\x1d\n\x19\x63om.oracle.coherence.grpcP\x01\x62\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services_pb2', globals()) @@ -25,5 +25,5 @@ DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n\031com.oracle.coherence.grpcP\001' _NAMEDCACHESERVICE._serialized_start=107 - _NAMEDCACHESERVICE._serialized_end=2065 + _NAMEDCACHESERVICE._serialized_end=2133 # @@protoc_insertion_point(module_scope) diff --git a/src/coherence/services_pb2.pyi b/src/coherence/services_pb2.pyi new file mode 100644 index 0000000..6197156 --- /dev/null +++ b/src/coherence/services_pb2.pyi @@ -0,0 +1,8 @@ +# mypy: ignore-errors +import messages_pb2 as _messages_pb2 +from google.protobuf import empty_pb2 as _empty_pb2 +from google.protobuf import wrappers_pb2 as _wrappers_pb2 +from google.protobuf import descriptor as _descriptor +from typing import ClassVar as _ClassVar + +DESCRIPTOR: _descriptor.FileDescriptor diff --git a/src/coherence/services_pb2_grpc.py b/src/coherence/services_pb2_grpc.py index 980ebc1..350d01c 100644 --- a/src/coherence/services_pb2_grpc.py +++ b/src/coherence/services_pb2_grpc.py @@ -88,6 +88,11 @@ def __init__(self, channel): request_serializer=messages__pb2.IsEmptyRequest.SerializeToString, response_deserializer=google_dot_protobuf_dot_wrappers__pb2.BoolValue.FromString, ) + self.isReady = channel.unary_unary( + '/coherence.NamedCacheService/isReady', + request_serializer=messages__pb2.IsReadyRequest.SerializeToString, + response_deserializer=google_dot_protobuf_dot_wrappers__pb2.BoolValue.FromString, + ) self.keySet = channel.unary_stream( '/coherence.NamedCacheService/keySet', request_serializer=messages__pb2.KeySetRequest.SerializeToString, @@ -266,6 +271,13 @@ def isEmpty(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def isReady(self, request, context): + """Determine whether a cache is empty. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def keySet(self, request, context): """Obtain all of the keys in the cache where the cache entries match a given filter. @@ -449,6 +461,11 @@ def add_NamedCacheServiceServicer_to_server(servicer, server): request_deserializer=messages__pb2.IsEmptyRequest.FromString, response_serializer=google_dot_protobuf_dot_wrappers__pb2.BoolValue.SerializeToString, ), + 'isReady': grpc.unary_unary_rpc_method_handler( + servicer.isReady, + request_deserializer=messages__pb2.IsReadyRequest.FromString, + response_serializer=google_dot_protobuf_dot_wrappers__pb2.BoolValue.SerializeToString, + ), 'keySet': grpc.unary_stream_rpc_method_handler( servicer.keySet, request_deserializer=messages__pb2.KeySetRequest.FromString, @@ -769,6 +786,23 @@ def isEmpty(request, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod + def isReady(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/coherence.NamedCacheService/isReady', + messages__pb2.IsReadyRequest.SerializeToString, + google_dot_protobuf_dot_wrappers__pb2.BoolValue.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod def keySet(request, target, diff --git a/src/coherence/util.py b/src/coherence/util.py index 19617f7..06c073d 100644 --- a/src/coherence/util.py +++ b/src/coherence/util.py @@ -11,7 +11,7 @@ from .comparator import Comparator from .extractor import ValueExtractor from .filter import Filter, Filters, MapEventFilter -from .messages_pb2 import ( # type: ignore +from .messages_pb2 import ( AddIndexRequest, AggregateRequest, ClearRequest, From 88dbe5ec24e046f07777c974b4cc0f64599dadf3 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Fri, 6 Sep 2024 07:58:06 -0700 Subject: [PATCH 2/4] - Update to later version of the protobuf tool chain - Update protobuf generation to produce .pyi files (this resolves some of the missing dependency errors seen in the IDE) - Re-generate the stubs from the latest protobuf files (exposes new features from the proxy) - Fix issues found by latest mypy refresh - Use standard TypeAlias --- src/coherence/aggregator.py | 4 +--- src/coherence/extractor.py | 4 +--- src/coherence/processor.py | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/coherence/aggregator.py b/src/coherence/aggregator.py index 4c22591..fd5874e 100644 --- a/src/coherence/aggregator.py +++ b/src/coherence/aggregator.py @@ -7,9 +7,7 @@ from abc import ABC from decimal import Decimal from enum import Enum, IntEnum -from typing import Any, Dict, Generic, List, Optional, TypeVar, Union - -from typing_extensions import TypeAlias +from typing import Any, Dict, Generic, List, Optional, TypeAlias, TypeVar, Union from .comparator import Comparator, InverseComparator, SafeComparator from .extractor import ExtractorExpression, Extractors, ValueExtractor diff --git a/src/coherence/extractor.py b/src/coherence/extractor.py index 69dd31c..482953b 100644 --- a/src/coherence/extractor.py +++ b/src/coherence/extractor.py @@ -5,9 +5,7 @@ from __future__ import annotations from abc import ABC, abstractmethod -from typing import Any, Generic, Optional, Sequence, TypeVar, Union, cast - -from typing_extensions import TypeAlias +from typing import Any, Generic, Optional, Sequence, TypeAlias, TypeVar, Union, cast from .serialization import proxy diff --git a/src/coherence/processor.py b/src/coherence/processor.py index 3da0eb9..6f992db 100644 --- a/src/coherence/processor.py +++ b/src/coherence/processor.py @@ -6,9 +6,7 @@ from abc import ABC from decimal import Decimal -from typing import Any, Generic, List, Optional, TypeVar, Union, cast - -from typing_extensions import TypeAlias +from typing import Any, Generic, List, Optional, TypeAlias, TypeVar, Union, cast from .extractor import ( CompositeUpdater, From cdfa0526537888aef6a28553f238a0621998a215 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Fri, 6 Sep 2024 08:07:33 -0700 Subject: [PATCH 3/4] - Update to later version of the protobuf tool chain - Update protobuf generation to produce .pyi files (this resolves some of the missing dependency errors seen in the IDE) - Re-generate the stubs from the latest protobuf files (exposes new features from the proxy) - Fix issues found by latest mypy refresh - Use standard TypeAlias --- pyproject.toml | 1 + src/coherence/aggregator.py | 4 +++- src/coherence/extractor.py | 4 +++- src/coherence/processor.py | 4 +++- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index fed1ad5..90e2057 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,6 +27,7 @@ grpcio = "1.66.1" grpcio-tools = "1.66.1" jsonpickle = ">=3.0,<3.4" pymitter = ">=0.4,<0.6" +typing-extensions = ">=4.11,<4.13" [tool.poetry.dev-dependencies] pytest = "~8.3" diff --git a/src/coherence/aggregator.py b/src/coherence/aggregator.py index fd5874e..4c22591 100644 --- a/src/coherence/aggregator.py +++ b/src/coherence/aggregator.py @@ -7,7 +7,9 @@ from abc import ABC from decimal import Decimal from enum import Enum, IntEnum -from typing import Any, Dict, Generic, List, Optional, TypeAlias, TypeVar, Union +from typing import Any, Dict, Generic, List, Optional, TypeVar, Union + +from typing_extensions import TypeAlias from .comparator import Comparator, InverseComparator, SafeComparator from .extractor import ExtractorExpression, Extractors, ValueExtractor diff --git a/src/coherence/extractor.py b/src/coherence/extractor.py index 482953b..44fd85c 100644 --- a/src/coherence/extractor.py +++ b/src/coherence/extractor.py @@ -5,7 +5,9 @@ from __future__ import annotations from abc import ABC, abstractmethod -from typing import Any, Generic, Optional, Sequence, TypeAlias, TypeVar, Union, cast +from typing import Any, Generic, Optional, Sequence, TypeVar, Union, cast, TypeAlias + +from typing_extensions import TypeAlias from .serialization import proxy diff --git a/src/coherence/processor.py b/src/coherence/processor.py index 6f992db..3da0eb9 100644 --- a/src/coherence/processor.py +++ b/src/coherence/processor.py @@ -6,7 +6,9 @@ from abc import ABC from decimal import Decimal -from typing import Any, Generic, List, Optional, TypeAlias, TypeVar, Union, cast +from typing import Any, Generic, List, Optional, TypeVar, Union, cast + +from typing_extensions import TypeAlias from .extractor import ( CompositeUpdater, From d5c7d5c6f2501521192581368bf9431665281494 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Fri, 6 Sep 2024 08:09:43 -0700 Subject: [PATCH 4/4] - Update to later version of the protobuf tool chain - Update protobuf generation to produce .pyi files (this resolves some of the missing dependency errors seen in the IDE) - Re-generate the stubs from the latest protobuf files (exposes new features from the proxy) - Fix issues found by latest mypy refresh - Use standard TypeAlias --- src/coherence/extractor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coherence/extractor.py b/src/coherence/extractor.py index 44fd85c..69dd31c 100644 --- a/src/coherence/extractor.py +++ b/src/coherence/extractor.py @@ -5,7 +5,7 @@ from __future__ import annotations from abc import ABC, abstractmethod -from typing import Any, Generic, Optional, Sequence, TypeVar, Union, cast, TypeAlias +from typing import Any, Generic, Optional, Sequence, TypeVar, Union, cast from typing_extensions import TypeAlias