How to initialize java Condition in Hazelcast

24 views
Skip to first unread message

Idan Osteraicher

unread,
Jan 4, 2023, 11:56:46 AM1/4/23
to Hazelcast
Hi Team,

I'm new to Hazelcast and I'm trying to create java Condition in Hazelcast but I have no idea how to do so. Is it possible? if so, what should I change in my code below?
@Getter
@Service
public class HazelcastService {

private FencedLock lock;
private PNCounter counter;
private Condition notEmpty;

@Autowired
HazelcastInstance hazelcastInstance;

@PostConstruct
public void init(){
lock = hazelcastInstance.getCPSubsystem().getLock(LIST_LOCK);
counter = hazelcastInstance.getPNCounter(COUNTER);
notEmpty = lock.newCondition();
}
}
Reply all
Reply to author
Forward
0 new messages