Skip to content

Does net.sf.jsqlparser.statement.Statement thread safe? #1627

@leotu

Description

@leotu

Should I reusing Statement increases performance?

protected final Map<String, Statement> statementCaches = Collections.synchronizedMap(new WeakHashMap<>());
...
Statement stmt = CCJSqlParserUtil.parse(sql)
...
statementCaches.computeIfAbsent(sql, stmt);
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions