{
return new Prepared() ;
}
else if (state == State.STATE_ABORTING)
{
return new Aborted() ;
}
else if (state == null)
{
if (coordinator.isReadOnly())
{
return new ReadOnly() ;
}
else
{
return new Aborted() ;
}
}
else if (state == State.STATE_PREPARING)
{
// typically means no response from the remote end.