public static enum Transaction.CommitPolicy extends Enum<Transaction.CommitPolicy>
Enum Constant and Description |
---|
GROUP
Every committed transaction is flushed to durable storage before
Transaction.commit() returns. |
HARD
Every committed transaction is flushed synchronously to durable
storage before the
Transaction.commit() method returns. |
SOFT
The
Transaction.commit() method returns before all updates have
been written to durable storage. |
Modifier and Type | Method and Description |
---|---|
static Transaction.CommitPolicy |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Transaction.CommitPolicy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Transaction.CommitPolicy SOFT
Transaction.commit()
method returns before all updates have
been written to durable storage. This policy is a compromise that
offers much better throughput, especially for sequential
transactions, but does not provide durability for every committed
transactions. Some recently committed transactions may be lost after
a crash/recovery cycle.public static final Transaction.CommitPolicy HARD
Transaction.commit()
method returns. With
this policy every transaction is durable before commit completes.public static final Transaction.CommitPolicy GROUP
Transaction.commit()
returns. Persistit attempts to
coordinate the I/O needed to do this with other pending transactions;
as a consequence, the commit method may pause briefly waiting for
other transactions to reach their commit points. In general this
option provides the slowest rate of sequential commits, but the
aggregate transaction throughput across many threads may be much
higher than with the HARD policy.public static Transaction.CommitPolicy[] values()
for (Transaction.CommitPolicy c : Transaction.CommitPolicy.values()) System.out.println(c);
public static Transaction.CommitPolicy valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2025 Open Identity Platform Community. All rights reserved.