Class ContainerListOperations
- All Implemented Interfaces:
AutoCloseable
Note that containers are optional components are are not stored on the Media
per default.
If containers are required, this class should be created and made persisted on the media. For this the header stored on the media can be modified.
To create the containers on the media the ContainerListOperations(Media, ContainerListProperties)
should be executed.
This method will create the ContainerListHeader
, which should be persisted on the Media
.
When the Media
is opened, the ContainerListOperations
can be recreated again if the
stored ContainerListHeader
is provided to the ContainerListOperations(Media, ContainerListHeader)
,
which will reopen the containers in the form as they've been persisted.
-
Constructor Summary
ConstructorDescriptionContainerListOperations
(Media media, ContainerListProperties containerListProperties) Creates a new container listContainerListOperations
(Media media, ContainerListHeader containerListHeader) Loads an existing container list -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected void
closeContainer
(String containerName) UseContainer.close()
to close the containers.create
(String containerName, ContainerMeta containerMeta) void
Should only be used internallygetMedia()
boolean
-
Constructor Details
-
ContainerListOperations
Creates a new container list- Parameters:
media
- the reference to the file
-
ContainerListOperations
Loads an existing container list- Parameters:
media
-containerListHeader
-
-
-
Method Details
-
getContainerListHeader
-
closeContainer
UseContainer.close()
to close the containers.This function is involved in irs operation and removes the container from the list, and allows to block the list during this operation.
- Parameters:
containerName
- the name of the container to be closed
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
get
-
getMemoryManagement
-
remove
-
listAllContainers
-
getMedia
-
create
-
evict
Should only be used internally- Parameters:
name
-
-