or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

bucketers.mdindex.mdsinks.mdutilities.mdwriters.md

utilities.mddocs/

0

# Utility Classes

1

2

Utility interfaces and classes that support the filesystem connector's operation.

3

4

## Clock Interface

5

6

Interface for providing current time to bucketing strategies.

7

8

```java { .api }

9

public interface Clock

10

```

11

12

### Method

13

14

```java { .api }

15

long currentTimeMillis()

16

```

17

18

Returns the current time in milliseconds since Unix epoch.

19

20

**Returns:** Current time in milliseconds

21

22

## SystemClock

23

24

Default Clock implementation that uses system time.

25

26

```java { .api }

27

public class SystemClock implements Clock

28

```

29

30

### Constructor

31

32

```java { .api }

33

public SystemClock()

34

```

35

36

Creates a SystemClock that returns System.currentTimeMillis().

37

38

### Usage Example

39

40

```java

41

import org.apache.flink.streaming.connectors.fs.Clock;

42

import org.apache.flink.streaming.connectors.fs.SystemClock;

43

44

// Typically used internally by the framework

45

Clock clock = new SystemClock();

46

long currentTime = clock.currentTimeMillis();

47

```

48

49

**Note:** Clock implementations are primarily used internally by bucketing strategies and are automatically provided by the BucketingSink.