Skip to content

Commit

Permalink
ns
Browse files Browse the repository at this point in the history
  • Loading branch information
belaban committed May 7, 2024
1 parent 65030ac commit 4796140
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions src/org/jgroups/protocols/JDBC_PING2.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ public class JDBC_PING2 extends FILE_PING {
@Property(description="The JDBC connection driver name", writable=false)
protected String connection_driver;

@Property(description="If not empty, this SQL statement will be performed at startup. Customize it to create the " +
@Property(description="If not null, this SQL statement will be performed at startup. Customize it to create the " +
"needed table on those databases which permit table creation attempt without losing data, such as PostgreSQL and " +
"MySQL (using IF NOT EXISTS). To allow for creation attempts, errors performing this statement will be logged"
+ "but not considered fatal. To avoid any creation, set this to an empty string.")
+ "but not considered fatal. To avoid any creation, set this to null.")
protected String initialize_sql=
"CREATE TABLE " + table_name + " (" +
"address varchar(200) NOT NULL, " +
Expand All @@ -56,25 +56,19 @@ public class JDBC_PING2 extends FILE_PING {
"coord boolean, " +
"PRIMARY KEY (address) )";

@Property(description="SQL used to insert a new row. Customizable, but keep the order of parameters and pick compatible types: " +
"1)Own Address, as String 2)Cluster name, as String 3)Serialized PingData as byte[]")
@Property(description="SQL used to insert a new row")
protected String insert_single_sql="INSERT INTO " + table_name + " values (?, ?, ?, ?, ?)";

@Property(description="SQL used to delete a row. Customizable, but keep the order of parameters and pick compatible types: " +
"1)Own Address, as String 2)Cluster name, as String")
@Property(description="SQL used to delete a row")
protected String delete_single_sql="DELETE FROM " + table_name + " WHERE address=? AND cluster=?";

@Property(description="SQL to clear the table")
protected String clear_sql="DELETE from " + table_name + " WHERE cluster=?";

@Property(description="SQL used to fetch all node's PingData. Customizable, but keep the order of parameters and pick compatible types: " +
"only one parameter needed, String compatible, representing the Cluster name. Must return a byte[], the Serialized PingData as" +
" it was stored by the insert_single_sql statement. Must select primary keys subsequently for cleanup to work properly")
@Property(description="SQL used to fetch the data of all nodes")
protected String select_all_pingdata_sql="SELECT address, name, ip, coord FROM " + table_name + " WHERE cluster=?";

@Property(description="To use a DataSource registered in JNDI, specify the JNDI name here. " +
"This is an alternative to all connection_* configuration options: if this property is not empty, then all connection related" +
"properties must be empty.")
@Property(description="To use a DataSource registered in JNDI, specify the JNDI name here")
protected String datasource_jndi_name;

@Property(description="The fully qualified name of a class which implements a Function<JDBC_PING,DataSource>. " +
Expand Down

0 comments on commit 4796140

Please sign in to comment.