public long approximateDataSize ( ) { long result = 0 ; for ( Map . Entry < String , DataNode > entry : nodes . entrySet ( ) ) { DataNode value = entry . getValue ( ) ; synchronized ( value ) { result += entry . getKey ( ) . length ( ) ; result += ( value . data == null ? 0 : value . data . length ) ; } } return result ; }
Get the size of the nodes based on path and data length .