org.multiverse
Interface MultiverseConstants

All Known Implementing Classes:
AbstractTransaction, PassAllCommitLockFilter

public interface MultiverseConstants

An interface containing global constants (currently only sanity check). It is a final instead of something mutable so that the JIT can completely remove code if some condition has not been met. The advantage is that you don't have to pay to price for adding some kind of check, if it isn't used. The problem is that the scope is all classes loaded by some classloader, share the same configuration. So one STM implementation with sanity checks enabled and the other not, is not possible.

It is an interface so that is can be 'implemented' for easier access.

Author:
Peter Veentjer

Field Summary
static boolean ___SANITY_CHECKS_ENABLED
          A flag that enables the sanity check build in the system.
 

Field Detail

___SANITY_CHECKS_ENABLED

static final boolean ___SANITY_CHECKS_ENABLED
A flag that enables the sanity check build in the system.

If sanity checks are enabled, the system can check all kinds of design by contract violations using pre/post condition checks and checking the invariants. It could be that these checks are costly so as end used you want to turn this off. For the time being it is true by default.

If the sanity checks are disabled, the JIT is completely removing



Copyright © 2008-2010 Multiverse. All Rights Reserved.