private boolean setValue ( String propertyName , String value , boolean sync ) throws NullPointerException { gatekeeper . signIn ( ) ; try { ChangeStack < String > stack = properties . get ( propertyName ) ; if ( stack == null ) { ChangeStack < String > newStack = new ChangeStack < String > ( value , sync ) ; stack = properties . putIfAbsent ( propertyName , newStack ) ; if ( stack == null ) { return true ; } } return sync ? stack . sync ( value ) : stack . push ( value ) ; } finally { gatekeeper . signOut ( ) ; } }
Push or sync the given value to the appropriate stack . This method will create a new stack if this property has never had a value before .