/** * Gets the OperationService. * * @return the OperationService. * @throws HazelcastInstanceNotActiveException if object is destroyed or HazelcastInstance shutdown. */ public final OperationService getOperationService() { return getNodeEngine().getOperationService(); }
@Override public final void destroy() { if (preDestroy()) { NodeEngine engine = getNodeEngine(); ProxyService proxyService = engine.getProxyService(); proxyService.destroyDistributedObject(getServiceName(), getDistributedObjectName()); postDestroy(); } }
@Override public String toString() { return getClass().getName() + '{' + "service=" + getServiceName() + ", name=" + getName() + '}'; }
@Override public int hashCode() { int result = getServiceName() != null ? getServiceName().hashCode() : 0; result = 31 * result + (getDistributedObjectName() != null ? getDistributedObjectName().hashCode() : 0); return result; }
protected Data getNameAsPartitionAwareData() { String name = getDistributedObjectName(); return getNodeEngine().getSerializationService().toData(name, PARTITIONING_STRATEGY); }
@Override protected boolean preDestroy() { if (super.preDestroy()) { eventPublishingService.fireMapClearedEvent(size(), name); return true; } return false; }
/** * Gets the node engine. * * @return the node engine * @throws HazelcastInstanceNotActiveException if NodeEngine not active or DistributedObject destroyed. */ public final NodeEngine getNodeEngine() { final NodeEngine engine = nodeEngine; lifecycleCheck(engine); return engine; }
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + name.hashCode(); return result; }
private void invalidate(DistributedObject distributedObject) { if (distributedObject != null && distributedObject instanceof AbstractDistributedObject) { ((AbstractDistributedObject) distributedObject).invalidate(); } } }
private void lifecycleCheck(final NodeEngine engine) { if (engine == null || !engine.isRunning()) { throwNotActiveException(); } }
@Override public String getPartitionKey() { return StringPartitioningStrategy.getPartitionKey(getDistributedObjectName()); }
protected String getDistributedObjectName() { return getName(); }
protected Data getNameAsPartitionAwareData() { String name = getDistributedObjectName(); return getNodeEngine().getSerializationService().toData(name, PARTITIONING_STRATEGY); }
@Override public int hashCode() { int result = getServiceName() != null ? getServiceName().hashCode() : 0; result = 31 * result + (getDistributedObjectName() != null ? getDistributedObjectName().hashCode() : 0); return result; }
@Override protected boolean preDestroy() { if (super.preDestroy()) { eventPublishingService.fireMapClearedEvent(size(), name); return true; } return false; }
/** * Gets the node engine. * * @return the node engine * @throws HazelcastInstanceNotActiveException if NodeEngine not active or DistributedObject destroyed. */ public final NodeEngine getNodeEngine() { final NodeEngine engine = nodeEngine; lifecycleCheck(engine); return engine; }
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + name.hashCode(); return result; }
private void invalidate(DistributedObject distributedObject) { if (distributedObject != null && distributedObject instanceof AbstractDistributedObject) { ((AbstractDistributedObject) distributedObject).invalidate(); } } }
private void lifecycleCheck(final NodeEngine engine) { if (engine == null || !engine.isRunning()) { throwNotActiveException(); } }
@Override public String getPartitionKey() { return StringPartitioningStrategy.getPartitionKey(getDistributedObjectName()); }