My problem is: I have class: I need to add new characters to StringBuilder concurrently and atomically. But problem is, only last 128 characters should be in this object. I can’t use StringBuffer, because operation should be non-blocking. So,there are two operations: First: check if StringBuilder already has 128 chars. Second: if it has not -> add new char, if