github.com/apache/beam/sdks/v2@v2.48.2/python/apache_beam/utils/windowed_value.pxd (about) 1 # 2 # Licensed to the Apache Software Foundation (ASF) under one or more 3 # contributor license agreements. See the NOTICE file distributed with 4 # this work for additional information regarding copyright ownership. 5 # The ASF licenses this file to You under the Apache License, Version 2.0 6 # (the "License"); you may not use this file except in compliance with 7 # the License. You may obtain a copy of the License at 8 # 9 # http://www.apache.org/licenses/LICENSE-2.0 10 # 11 # Unless required by applicable law or agreed to in writing, software 12 # distributed under the License is distributed on an "AS IS" BASIS, 13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 # See the License for the specific language governing permissions and 15 # limitations under the License. 16 # 17 18 cimport cython 19 from libc.stdint cimport int64_t 20 21 22 cdef type Timestamp 23 24 25 cdef list _BYTE_TO_PANE_INFO 26 27 @cython.final 28 cdef class PaneInfo(object): 29 cdef readonly bint _is_first 30 cdef readonly bint _is_last 31 cdef readonly int _timing 32 cdef readonly int _index 33 cdef readonly int _nonspeculative_index 34 cdef readonly unsigned char _encoded_byte 35 36 @cython.final 37 cdef class WindowedValue(object): 38 cdef public object value 39 cdef public object windows 40 cdef public object pane_info 41 cdef public int64_t timestamp_micros 42 cdef object timestamp_object 43 44 cpdef WindowedValue with_value(self, new_value) 45 46 cdef class WindowedBatch(object): 47 cpdef WindowedBatch with_values(self, object new_values) 48 49 cdef class HomogeneousWindowedBatch(WindowedBatch): 50 cdef public WindowedValue _wv 51 52 cpdef WindowedBatch with_values(self, object new_values) 53 54 @cython.locals(wv=WindowedValue) 55 cpdef WindowedValue create( 56 object value, int64_t timestamp_micros, object windows, object pane_info=*) 57 58 59 cdef class _IntervalWindowBase(object): 60 cdef object _start_object 61 cdef readonly int64_t _start_micros 62 cdef object _end_object 63 cdef readonly int64_t _end_micros