Class CreatingPmFilesProvider
java.lang.Object
com._1c.g5.v8.dt.internal.pm.connection.mmf.DefaultPmFilesProvider
com._1c.g5.v8.dt.internal.pm.connection.mmf.CreatingPmFilesProvider
- All Implemented Interfaces:
PmTempFilesProvider
,AutoCloseable
PmTempFilesProvider
implementation. Creates new tmp directory and temporary files in that directory.
Deletes dir on close()
.-
Nested Class Summary
Nested classes/interfaces inherited from class com._1c.g5.v8.dt.internal.pm.connection.mmf.DefaultPmFilesProvider
DefaultPmFilesProvider.DataDirection
-
Field Summary
Fields inherited from class com._1c.g5.v8.dt.internal.pm.connection.mmf.DefaultPmFilesProvider
dataBuffer, dir, lockA, lockB, lockC
-
Constructor Summary
ConstructorsConstructorDescriptionCreatingPmFilesProvider
(File processRootDir, DefaultPmFilesProvider.DataDirection dataDirection) Constructs new instance for process with given process root dir and data direction. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected static void
createFile
(File f) Creates given file if it does not exist.Returns temporary directory where temporary files located.Methods inherited from class com._1c.g5.v8.dt.internal.pm.connection.mmf.DefaultPmFilesProvider
getDataBuffer, getLockA, getLockB, getLockC, getRootDir
-
Constructor Details
-
CreatingPmFilesProvider
public CreatingPmFilesProvider(File processRootDir, DefaultPmFilesProvider.DataDirection dataDirection) throws IOException Constructs new instance for process with given process root dir and data direction.- Parameters:
processRootDir
- given process root dir (notnull
)dataDirection
- given data direction (notnull
)- Throws:
IOException
- if initializing temporary location fails
-
-
Method Details
-
getRootDirectory
Returns temporary directory where temporary files located.- Returns:
- temporary directory where temporary files located (not
null
)
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfacePmTempFilesProvider
- Overrides:
close
in classDefaultPmFilesProvider
- Throws:
IOException
-
createFile
Creates given file if it does not exist.- Parameters:
f
- given file (notnull
)- Throws:
IOException
- if file creation fails
-