Class ArtifactsCachePublisherImpl
- java.lang.Object
-
- jetbrains.buildServer.agent.impl.BaseArtifactsPublisher
-
- jetbrains.buildServer.agent.publisher.ArtifactsCachePublisherImpl
-
- All Implemented Interfaces:
AgentExtension
,ArtifactsPublisher
,ArtifactsCachePublisher
,TeamCityExtension
public class ArtifactsCachePublisherImpl extends BaseArtifactsPublisher implements ArtifactsCachePublisher
Created by Nikita Skvortsov date: 30.09.13.
-
-
Field Summary
Fields Modifier and Type Field Description static String
DISABLE_FILECACHE_PUBLISHING
static String
TYPE_NAME
-
Constructor Summary
Constructors Constructor Description ArtifactsCachePublisherImpl(BuildAgentConfiguration configuration, EventDispatcher<AgentLifeCycleListener> dispatcher, ArtifactCacheProvider provider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getType()
Get type string id.boolean
isEnabled()
Check if this publisher is currently enabled.boolean
publishFile(File file, String path, String digest)
int
publishFiles(Map<File,String> filePathMap)
Publishes files.int
publishFiles(Map<File,String> filePathMap, Map<File,String> digestMap)
-
-
-
Field Detail
-
DISABLE_FILECACHE_PUBLISHING
public static final String DISABLE_FILECACHE_PUBLISHING
- See Also:
- Constant Field Values
-
TYPE_NAME
public static final String TYPE_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ArtifactsCachePublisherImpl
public ArtifactsCachePublisherImpl(@NotNull BuildAgentConfiguration configuration, @NotNull EventDispatcher<AgentLifeCycleListener> dispatcher, @NotNull ArtifactCacheProvider provider)
-
-
Method Detail
-
publishFiles
public int publishFiles(@NotNull Map<File,String> filePathMap) throws ArtifactPublishingFailedException
Description copied from interface:ArtifactsPublisher
Publishes files. Note that publishing is performed from the agent messages queue and thus this method can be called when build on the agent is already finished.- Specified by:
publishFiles
in interfaceArtifactsPublisher
- Parameters:
filePathMap
- map of the file to publish to its destination directory- Returns:
- number of successfully published files
- Throws:
ArtifactPublishingFailedException
- if publishing failed
-
publishFile
public boolean publishFile(File file, String path, String digest)
- Specified by:
publishFile
in interfaceArtifactsCachePublisher
-
publishFiles
public int publishFiles(@NotNull Map<File,String> filePathMap, @NotNull Map<File,String> digestMap)
- Specified by:
publishFiles
in interfaceArtifactsCachePublisher
-
isEnabled
public boolean isEnabled()
Description copied from interface:ArtifactsPublisher
Check if this publisher is currently enabled. Allows disabling/skipping publishers in runtime.- Specified by:
isEnabled
in interfaceArtifactsPublisher
- Overrides:
isEnabled
in classBaseArtifactsPublisher
- Returns:
- see above.
-
getType
@NotNull public String getType()
Description copied from interface:ArtifactsPublisher
Get type string id. Should matchjetbrains.buildServer.serverSide.storage.StorageType#getType()
- Specified by:
getType
in interfaceArtifactsPublisher
- Returns:
- see above
-
-