public class OpenShiftBinaryRSync extends AbstractOpenShiftBinaryCapability implements IRSyncable
AbstractOpenShiftBinaryCapability.CommandLineBuilderIRSyncable.Delete, IRSyncable.Exclude, IRSyncable.GitFolderExclude, IRSyncable.LocalPeer, IRSyncable.NoPerms, IRSyncable.Peer, IRSyncable.PodPeerIBinaryCapability.OpenShiftBinaryOption, IBinaryCapability.SkipTlsVerify| Modifier and Type | Field and Description |
|---|---|
static String |
RSYNC_COMMAND |
DELETE, EXCLUDE_GIT_FOLDER, NO_PERMSOPENSHIFT_BINARY_LOCATION, SKIP_TLS_VERIFY| Constructor and Description |
|---|
OpenShiftBinaryRSync(IClient client)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
await()
Blocks until the process is done.
|
protected String |
buildArgs(List<IBinaryCapability.OpenShiftBinaryOption> options)
Callback for building args to be sent to the
oc command. |
protected void |
cleanup()
Cleanup required when stopping the process
|
int |
exitValue() |
String |
getName()
Well known name of the capability
|
boolean |
isDone()
Indicates if the
Process completed or not |
boolean |
isSupported()
Allow the implementation of the capability to determine if it is supported on
the OpenShift server.
|
InputStream |
sync(IRSyncable.Peer source,
IRSyncable.Peer destination,
IBinaryCapability.OpenShiftBinaryOption... options)
Synchronizes the give
destination with the given source |
protected boolean |
validate()
Validate arguments before starting process
|
protected void |
waitFor(Process process) |
getClient, getOpenShiftBinaryLocation, getProcess, start, startProcess, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexclude, stoppublic static final String RSYNC_COMMAND
public OpenShiftBinaryRSync(IClient client)
client - the client to connect to OpenShift.public InputStream sync(IRSyncable.Peer source, IRSyncable.Peer destination, IBinaryCapability.OpenShiftBinaryOption... options) throws OpenShiftException
IRSyncabledestination with the given sourcesync in interface IRSyncablesource - the source of the rsyncdestination - the destination of the rsyncoptions - the options to pass to the underlying oc rsync commandProcess streams to be displayed in a console.OpenShiftExceptionprotected void waitFor(Process process)
public boolean isDone()
IRSyncableProcess completed or notisDone in interface IRSyncabletrue if the Process completed,
false otherwise.public int exitValue()
exitValue in interface IRSyncableProcess exit value when it completed, -1 if it's
still runningpublic void await()
throws InterruptedException
IRSyncableawait in interface IRSyncableInterruptedException - if the current thread is interrupted while waitingprotected void cleanup()
AbstractOpenShiftBinaryCapabilitycleanup in class AbstractOpenShiftBinaryCapabilityprotected boolean validate()
AbstractOpenShiftBinaryCapabilityvalidate in class AbstractOpenShiftBinaryCapabilitypublic boolean isSupported()
ICapabilityisSupported in interface ICapabilitypublic String getName()
ICapabilitygetName in interface ICapabilityprotected String buildArgs(List<IBinaryCapability.OpenShiftBinaryOption> options)
AbstractOpenShiftBinaryCapabilityoc command.buildArgs in class AbstractOpenShiftBinaryCapabilityoc command.Copyright © 2020 Red Hat, Inc. All Rights Reserved.