Package org.gnome.webkit
Class WebsiteDataManager.Builder<B extends WebsiteDataManager.Builder<B>>
java.lang.Object
io.github.jwharm.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.gnome.webkit.WebsiteDataManager.Builder<B>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Enclosing class:
WebsiteDataManager
public static class WebsiteDataManager.Builder<B extends WebsiteDataManager.Builder<B>>
extends GObject.Builder<B>
Inner class implementing a builder pattern to construct a GObject with
properties.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theWebsiteDataManager
object.setBaseCacheDirectory
(String baseCacheDirectory) The base directory for caches.setBaseDataDirectory
(String baseDataDirectory) The base directory for website data.setIsEphemeral
(boolean isEphemeral) Whether theWebKitWebsiteDataManager
is ephemeral.setOriginStorageRatio
(double originStorageRatio) The percentage of volume space that can be used for data storage for every domain.setTotalStorageRatio
(double totalStorageRatio) The percentage of volume space that can be used for data storage for all domains.Methods inherited from class org.gnome.gobject.GObject.Builder
onNotify
Methods inherited from class io.github.jwharm.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilder
object.
-
-
Method Details
-
build
Finish building theWebsiteDataManager
object. This will callGObject.withProperties(org.gnome.glib.Type, java.lang.String[], org.gnome.gobject.Value[])
to create a new GObject instance, which is then cast toWebsiteDataManager
.- Overrides:
build
in classGObject.Builder<B extends WebsiteDataManager.Builder<B>>
- Returns:
- a new instance of
WebsiteDataManager
with the properties that were set in the Builder object. - Throws:
UnsupportedPlatformException
- when run on an unsupported platform
-
setBaseCacheDirectory
-
setBaseDataDirectory
-
setIsEphemeral
Whether theWebKitWebsiteDataManager
is ephemeral. An ephemeralWebKitWebsiteDataManager
handles all websites data as non-persistent, and nothing will be written to the client storage. Note that if you create an ephemeralWebKitWebsiteDataManager
all other construction parameters to configure data directories will be ignored.- Parameters:
isEphemeral
- the value for theis-ephemeral
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setOriginStorageRatio
The percentage of volume space that can be used for data storage for every domain. If the maximum storage is reached the storage request will fail with a QuotaExceededError exception. A value of 0.0 means that data storage is not allowed. A value of -1.0, which is the default, means WebKit will use the default quota (1 GiB).- Parameters:
originStorageRatio
- the value for theorigin-storage-ratio
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setTotalStorageRatio
The percentage of volume space that can be used for data storage for all domains. If the maximum storage is reached the eviction will happen. A value of 0.0 means that data storage is not allowed. A value of -1.0, which is the default, means there's no limit for the total storage.- Parameters:
totalStorageRatio
- the value for thetotal-storage-ratio
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-