Package jenkins.util.io
Class FileBoolean
- java.lang.Object
-
- jenkins.util.io.FileBoolean
-
public class FileBoolean extends Object
Uses a presence/absence of a file as a persisted boolean storage.This is convenient when you need to store just a few bits of infrequently accessed information as you can forget the explicit persistence of it. This class masks I/O problem, so if the persistence fails, you'll get no error report.
- Since:
- 1.498
- Author:
- Kohsuke Kawaguchi
-
-
Constructor Summary
Constructors Constructor Description FileBoolean(File file)
FileBoolean(Class owner, String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
fastGet()
boolean
get()
Gets the current state.boolean
isOff()
boolean
isOn()
void
off()
void
on()
void
set(boolean b)
-