Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
SnapArchivingServers
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software Control System
Tango controls archiving
SnapArchivingServers
Commits
8a546dcf
Commit
8a546dcf
authored
4 years ago
by
Arnaud Jelmoni
Browse files
Options
Downloads
Patches
Plain Diff
Remove warning
parent
923fbf61
No related branches found
Tags
release_2_1_3
No related merge requests found
Pipeline
#371
failed
4 years ago
Stage: build
Stage: test
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
snapmanager/src/main/java/SnapManager/SnapManager.java
+1
-1
1 addition, 1 deletion
snapmanager/src/main/java/SnapManager/SnapManager.java
snapmanager/src/main/java/SnapManager/SnapManagerClass.java
+6
-114
6 additions, 114 deletions
snapmanager/src/main/java/SnapManager/SnapManagerClass.java
with
7 additions
and
115 deletions
snapmanager/src/main/java/SnapManager/SnapManager.java
+
1
−
1
View file @
8a546dcf
...
@@ -355,7 +355,7 @@ public class SnapManager extends DeviceImpl/* WithShutdownRunnable */ implements
...
@@ -355,7 +355,7 @@ public class SnapManager extends DeviceImpl/* WithShutdownRunnable */ implements
public
void
launch_snap_shot
(
int
argin
)
throws
DevFailed
{
public
void
launch_snap_shot
(
int
argin
)
throws
DevFailed
{
LOGGER
.
info
(
"Entering launch_snap_shot()"
);
LOGGER
.
info
(
"Entering launch_snap_shot()"
);
if
(
get_state
().
equals
(
DevState
.
RUNNING
))
{
if
(
get_state
().
equals
(
DevState
.
RUNNING
))
{
DevFailedUtils
.
thro
wDevFailed
(
"STATE_ERROR"
,
"snapshot alreadly in progress"
);
throw
DevFailedUtils
.
ne
wDevFailed
(
"STATE_ERROR"
,
"snapshot alreadly in progress"
);
}
}
set_state
(
DevState
.
RUNNING
);
set_state
(
DevState
.
RUNNING
);
Future
<
Integer
>
snapshotResult
=
executorService
.
submit
(
new
SnapshotTask
(
argin
));
Future
<
Integer
>
snapshotResult
=
executorService
.
submit
(
new
SnapshotTask
(
argin
));
...
...
This diff is collapsed.
Click to expand it.
snapmanager/src/main/java/SnapManager/SnapManagerClass.java
+
6
−
114
View file @
8a546dcf
...
@@ -89,27 +89,6 @@ public class SnapManagerClass extends DeviceClass implements TangoConst {
...
@@ -89,27 +89,6 @@ public class SnapManagerClass extends DeviceClass implements TangoConst {
private
static
final
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
SnapManagerClass
.
class
);
private
static
final
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
SnapManagerClass
.
class
);
// --------- Start of properties data members ----------
/**
* Computer identifier on wich is settled the database HDB. The identifier
* can be the computer name or its IP address. <br>
* <b>Default value : </b> localhost.
*/
private
String
dbHost
;
/**
* Database name.<br>
* <b>Default value : </b> hdb
*/
private
String
dbName
;
/**
* Database schema name.<br>
* <b>Default value : </b> snap
*/
private
String
dbSchema
;
// --------- End of properties data members ----------
/**
/**
* SnapManagerClass class instance (it is a singleton).
* SnapManagerClass class instance (it is a singleton).
*/
*/
...
@@ -172,9 +151,6 @@ public class SnapManagerClass extends DeviceClass implements TangoConst {
...
@@ -172,9 +151,6 @@ public class SnapManagerClass extends DeviceClass implements TangoConst {
super
(
name
);
super
(
name
);
LOGGER
.
info
(
"Entering SnapManagerClass constructor"
);
LOGGER
.
info
(
"Entering SnapManagerClass constructor"
);
// write_class_property();
get_class_property
();
LOGGER
.
info
(
"Leaving SnapManagerClass constructor"
);
LOGGER
.
info
(
"Leaving SnapManagerClass constructor"
);
}
}
...
@@ -185,6 +161,7 @@ public class SnapManagerClass extends DeviceClass implements TangoConst {
...
@@ -185,6 +161,7 @@ public class SnapManagerClass extends DeviceClass implements TangoConst {
// description : Create the command object(s) and store them in the
// description : Create the command object(s) and store them in the
// command list
// command list
// ===================================================================
// ===================================================================
@SuppressWarnings
(
"unchecked"
)
@Override
@Override
public
void
command_factory
()
{
public
void
command_factory
()
{
command_list
.
addElement
(
new
CreateNewContextClass
(
"CreateNewContext"
,
Tango_DEVVAR_STRINGARRAY
,
Tango_DEV_LONG
,
command_list
.
addElement
(
new
CreateNewContextClass
(
"CreateNewContext"
,
Tango_DEVVAR_STRINGARRAY
,
Tango_DEV_LONG
,
...
@@ -235,6 +212,7 @@ public class SnapManagerClass extends DeviceClass implements TangoConst {
...
@@ -235,6 +212,7 @@ public class SnapManagerClass extends DeviceClass implements TangoConst {
// Method: attribute_factory(Vector att_list)
// Method: attribute_factory(Vector att_list)
//
//
// =============================================================================
// =============================================================================
@SuppressWarnings
({
"unchecked"
,
"rawtypes"
})
@Override
@Override
public
void
attribute_factory
(
final
Vector
att_list
)
throws
DevFailed
{
public
void
attribute_factory
(
final
Vector
att_list
)
throws
DevFailed
{
// Attribute : version
// Attribute : version
...
@@ -252,6 +230,7 @@ public class SnapManagerClass extends DeviceClass implements TangoConst {
...
@@ -252,6 +230,7 @@ public class SnapManagerClass extends DeviceClass implements TangoConst {
// argument : in : String[] devlist : The device name list
// argument : in : String[] devlist : The device name list
//
//
// ===================================================================
// ===================================================================
@SuppressWarnings
(
"unchecked"
)
@Override
@Override
public
void
device_factory
(
final
String
[]
devlist
)
throws
DevFailed
{
public
void
device_factory
(
final
String
[]
devlist
)
throws
DevFailed
{
...
@@ -287,94 +266,7 @@ public class SnapManagerClass extends DeviceClass implements TangoConst {
...
@@ -287,94 +266,7 @@ public class SnapManagerClass extends DeviceClass implements TangoConst {
*/
*/
// ===================================================================
// ===================================================================
public
DbDatum
get_class_property
(
final
String
name
)
throws
DevFailed
{
public
DbDatum
get_class_property
(
final
String
name
)
throws
DevFailed
{
// for (int i = 0; i < cl_prop.length; i++) {
// if (cl_prop[i].name.equals(name)) {
// return cl_prop[i];
// }
// }
final
DbDatum
[]
classProps
=
get_db_class
().
get_property
(
new
String
[]
{
name
});
final
DbDatum
[]
classProps
=
get_db_class
().
get_property
(
new
String
[]
{
name
});
return
classProps
[
0
];
return
classProps
[
0
];
}
}
// ===================================================================
/**
* Read the class properties from database.
*/
// ===================================================================
public
void
get_class_property
()
throws
DevFailed
{
// Initialize your default values here.
// ------------------------------------------
// // Read class properties from database.(Automatic code generation)
// //-------------------------------------------------------------
// if ( Util._UseDb == false )
// return;
// String[] propnames = {
// };
//
// // Call database and extract values
// //--------------------------------------------
// cl_prop = get_db_class().get_property(propnames);
// int i = -1;
//
// // End of Automatic code generation
// -------------------------------------------------------------
// -------------------------------------------------------------
// if (Util._UseDb == false) {
// return;
// }
// String[] propnames = { "DbHost", "DbName", "DbSchema" };
//
// // Call database and extract values
// // --------------------------------------------
// cl_prop = get_db_class().get_property(propnames);
// int i = -1;
// // Extract DbHost value
// if (cl_prop[++i].is_empty() == false) {
// dbHost = cl_prop[i].extractString();
// }
//
// // Extract DbName value
// if (cl_prop[++i].is_empty() == false) {
// dbName = cl_prop[i].extractString();
// }
//
// // Extract DbSchema value
// if (cl_prop[++i].is_empty() == false) {
// dbSchema = cl_prop[i].extractString();
// }
// End of Automatic code generation
// -------------------------------------------------------------
}
// ===================================================================
/**
* Set class description as property in database
*/
// ===================================================================
// private void write_class_property() throws DevFailed {
// // First time, check if database used
// // --------------------------------------------
// if (Util._UseDb == false) {
// return;
// }
//
// // Prepeare DbDatum
// // --------------------------------------------
// final DbDatum[] data = new DbDatum[2];
// data[0] = new DbDatum("ProjectTitle");
// data[0].insert("Tango Device Server");
//
// data[1] = new DbDatum("Description");
// data[1].insert("This DServer provides the connections points and methods to the SnapShot service.");
//
// // Call database and and values
// // --------------------------------------------
// get_db_class().put_property(data);
// }
}
}
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