# io.github.libtmux.Server.Server.snapshot

- **Module:** io.github.libtmux.Server.Server
- **Package:** io.github.libtmux:libtmux
- **Language:** Java
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-java/blob/c3517519ee799428a809ce6deb1708c8be289cd1/libtmux/src/main/java/io/github/libtmux/Server.java#L499
- **Page:** https://libtmux.org/reference/java/io-github-libtmux-server-server-snapshot/

```
io.github.libtmux.Server.Server.snapshot() -> ServerSnapshot
```

Captures the whole hierarchy in at most four listings, retrying once if the server is replaced.

<p>One server-wide listing per kind of object, so ordering and membership stay tmux's decision
rather than being re-derived from another listing's rows.

<p>Strict, unlike the lenient list accessors: a capture that failed raises instead of
returning an apparently valid empty graph, because a caller cannot tell those apart.

## Raises

- `LibTmuxException` — if a listing fails or the listings cannot form one valid snapshot
