# io.github.libtmux.IncarnationFence

- **Module:** io.github.libtmux
- **Package:** io.github.libtmux:libtmux
- **Language:** Java
- **Kind:** class
- **Source:** https://github.com/libtmux/libtmux-java/blob/f56392b5d9bc7f1f9c1631842333fb90f3d82d40/libtmux/src/main/java/io/github/libtmux/IncarnationFence.java#L21
- **Page:** https://libtmux.org/en/java/latest/reference/io-github-libtmux-incarnationfence-incarnationfence/

Which tmux server incarnation a handle or batch may act on: the pid tmux reports, and its start time when known, since a pid alone is reusable — a tmux started on the pid of one just probed, as a container's first processes often are, would otherwise answer as if it were that server.

Every guarded command is sent as tmux's own {@code if-shell -F} test of this condition, so a
server that has been replaced under a stale handle is refused before anything runs, rather than
acting on the wrong incarnation.

## Members

### Other members

- `guarded` (method): Refuses to reach a tmux server that is not the one this handle was made against.
- `identity` (method)
- `incarnation` (method): A condition true only on the server a capture named: its pid, and its start time when known.
- `IncarnationFence` (method)
- `requireSameIncarnation` (method)
- `requireSameServer` (method)
- `run` (method): As {@link #guarded(ServerSnapshot, String, String)}, refused as well once the window has gone.
