Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
f4a78180
Commit
f4a78180
authored
16 years ago
by
ribeaudc
Browse files
Options
Downloads
Patches
Plain Diff
[DMV-12] add: - 'AlwaysAboveFreeSpaceProvider'.
change: - 'RemoteFreeSpaceProvider' finished. SVN: 6078
parent
21948456
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
datamover/source/java/ch/systemsx/cisd/datamover/filesystem/store/FileStoreRemote.java
+10
-6
10 additions, 6 deletions
...emsx/cisd/datamover/filesystem/store/FileStoreRemote.java
with
10 additions
and
6 deletions
datamover/source/java/ch/systemsx/cisd/datamover/filesystem/store/FileStoreRemote.java
+
10
−
6
View file @
f4a78180
...
...
@@ -22,9 +22,11 @@ import org.apache.log4j.Logger;
import
ch.systemsx.cisd.common.exceptions.NotImplementedException
;
import
ch.systemsx.cisd.common.exceptions.Status
;
import
ch.systemsx.cisd.common.highwatermark.AlwaysAboveFreeSpaceProvider
;
import
ch.systemsx.cisd.common.highwatermark.FileWithHighwaterMark
;
import
ch.systemsx.cisd.common.highwatermark.HighwaterMarkWatcher
;
import
ch.systemsx.cisd.common.highwatermark.RemoteFreeSpaceProvider
;
import
ch.systemsx.cisd.common.highwatermark.HighwaterMarkWatcher.IFreeSpaceProvider
;
import
ch.systemsx.cisd.common.logging.ISimpleLogger
;
import
ch.systemsx.cisd.common.logging.LogCategory
;
import
ch.systemsx.cisd.common.logging.LogFactory
;
...
...
@@ -58,15 +60,17 @@ public class FileStoreRemote extends FileStore
final
String
host
)
{
final
File
sshExecutable
=
factory
.
tryFindSshExecutable
();
final
IFreeSpaceProvider
freeSpaceProvider
;
if
(
sshExecutable
!=
null
)
{
return
new
HighwaterMarkWatcher
(
highwaterMark
,
new
RemoteFreeSpaceProvider
(
host
,
sshExecutable
));
freeSpaceProvider
=
new
RemoteFreeSpaceProvider
(
host
,
sshExecutable
);
}
else
{
operationLog
.
warn
(
"Impossible to remotely watch the 'high water mark' "
+
"('ssh' executable not found)."
);
freeSpaceProvider
=
AlwaysAboveFreeSpaceProvider
.
INSTANCE
;
}
// We set the "high water mark" to -1, meaning that the system will not be watching.
operationLog
.
warn
(
"Impossible to remotely watch the 'high water mark' "
+
"(ssh executable not found)."
);
return
new
HighwaterMarkWatcher
(-
1
);
return
new
HighwaterMarkWatcher
(
highwaterMark
,
freeSpaceProvider
);
}
//
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment